Summary
YamuxSession and YamuxStream logged SEVERE level error tracebacks when write or read operations failed due to connection/session closure during teardown. Additionally, _adaptivePacing introduced a 1ms timer delay per frame even for fast, non-congested transports.
Problem
- Routine socket teardown or host shutdown caused spurious
SEVERE log outputs when streams attempted to send final frames or read on closed sockets.
Future.delayed(Duration(milliseconds: 1)) in _adaptivePacing added artificial sleeping delay per chunk during high-throughput local writes.
Proposed Fix
- Check
_closed || _connection.isClosed in _sendFrame and terminal states in YamuxStream.read before logging SEVERE errors.
- Update
_adaptivePacing to yield via Future.delayed(Duration.zero) microtask scheduling for non-congested writes.
Summary
YamuxSessionandYamuxStreamloggedSEVERElevel error tracebacks when write or read operations failed due to connection/session closure during teardown. Additionally,_adaptivePacingintroduced a 1ms timer delay per frame even for fast, non-congested transports.Problem
SEVERElog outputs when streams attempted to send final frames or read on closed sockets.Future.delayed(Duration(milliseconds: 1))in_adaptivePacingadded artificial sleeping delay per chunk during high-throughput local writes.Proposed Fix
_closed || _connection.isClosedin_sendFrameand terminal states inYamuxStream.readbefore loggingSEVEREerrors._adaptivePacingto yield viaFuture.delayed(Duration.zero)microtask scheduling for non-congested writes.