MultiplexingStream.Channel.Input.CopyToAsync hangs when data exceeds window size
AArnott opened this issue · 0 comments
AArnott commented
A multiplexing channel in protocol version 2 and later has a 'window size' to limit the size of a receive buffer. As data is read from the buffer, the occupied bytes in the 'window' are freed, allowing for more data to be transmitted. This works in the channel's typical read functions. But its CopyToAsync override simply defers to the underlying pipe's implementation, and never advances the window. This leads to a hang where data cannot be transmitted when the data exceeds the window size, and CopyToAsync never completes.