Closed eithed closed 5 years ago
I'm agree with U, the #18 is IMO more understandable and don't need do/while. I don't get the point, why this do/while has been implemented at the beginning.
@Th3Mouk - would it be worth creating a release?
@eithed yep absolutely i'm just looking if i can include something else in the release
There's a couple of changes here:
onNext
$dataLength > $messageLength
case we've a scenario where one packet contains end of one message and beginning of another - as suchcurrentMessage
should become the remainder of $valueelse
case we already have added currentMessage to value - in case where a message spans multiple packets, this will causes following (let's assume our message spans across multiple packets and is ABCD);At any point $dataLength > $messageLength condition can be encountered; it fails to decompose the message, because it was incorrectly assembled.