csharp
csharp copied to clipboard
MuxedStream.ReadAsync ignores the cancellation token
While investigating rare / hard to reproduce hangs, I noticed that MuxedStream.ReadAsync ignores the passed cancellation token. In the related StreamDemuxer class, the reads are done to the underlying web socket by passing a cancellation token that is only related to the disposal of the StreamDemuxer, so there does not seem to be a clear alternative to garantee the reads will not result in a hang in rare cases.