Description
The MuxManager.route method has a race condition that causes duplicate frames, silent STREAM frame loss which also causes stalled downloads (downloads stuck at 0%).
In addition, the entire multiplexer layer lacks socket back-pressure and drain handling. When the sender outruns the receiver, the per-peer assembly buffer can grow indefinitely, and outbound writes can pile up without ever waiting for the OS socket buffer to drain.
Description
The
MuxManager.routemethod has a race condition that causes duplicate frames, silent STREAM frame loss which also causes stalled downloads (downloads stuck at 0%).In addition, the entire multiplexer layer lacks socket back-pressure and drain handling. When the sender outruns the receiver, the per-peer assembly buffer can grow indefinitely, and outbound writes can pile up without ever waiting for the OS socket buffer to drain.