Closed koush closed 1 year ago
Issue was observed in electron.
Hi. Sorry for responding so late. I am using it in Electron and have not received any such error report in production nor in development. Will keep an eye on it anyway.
For the pull request:
package.json
that are not needed in this pull requestYeah I forked a while ago to publish the fix so it ended up including the changes from my branch.
waitForData sets the
minBytesNeeded
to 0 because MCS_SIZE is a varint. since there's no constraint on that size, it immediately tries to parse again, resulting in an infinite loop.the fix is to set the waitingForData flag again and wait for any data to come in before trying (and possibly failing) again.