Open kevinresol opened 7 years ago
I wonder why it minus delim.length here
delim.length
If the bytes comes in like | -- message -- | -- delim -- | then the said code will make it only read til the end of the message but it won't progress because it will not encounter the delimiter at all
| -- message -- | -- delim -- |
Well, I think it makes sense to change to:
if (!atEnd) { if (length < delim.length) length = 0; }
I wonder why it minus
delim.length
hereIf the bytes comes in like
| -- message -- | -- delim -- |
then the said code will make it only read til the end of the message but it won't progress because it will not encounter the delimiter at all