fix(usbmux): handle decoder errors and preserve unconsumed bytes on connect - #304
Conversation
|
do we ever risk buffer overflow? I don't see any limits imposed other to its size |
HI @mykola-mokhnach , it was pre existing, the old cap never protected this path.
Hi @mykola-mokhnach, The old This PR keeps that behavior unchanged and only fixes the crash, the dead splitter, and the byte loss on connect. |
## [5.16.1](v5.16.0...v5.16.1) (2026-08-27) ### Bug Fixes * **usbmux:** handle decoder errors and preserve unconsumed bytes on connect ([#304](#304)) ([52db21c](52db21c))
|
🎉 This PR is included in version 5.16.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Fixes three issues in the usbmux layer.
parsePlisterrors were not caught. The decoder now emits an error event instead.LengthBasedSplitterwas piped from the socket but never consumed, so it buffered all traffic. It is removed since the decoder does its own framing.connect()dropped bytes that arrived after the Result frame in the same chunk. They are now pushed back to the socket so the caller receives them.Adds unit tests for all three cases.