SlyMarbo / spdy

[deprecated] A full-featured SPDY library for the Go language.
BSD 2-Clause "Simplified" License
118 stars 13 forks source link

Blocking on frame processing #18

Closed SlyMarbo closed 11 years ago

SlyMarbo commented 11 years ago

Since frames received by the connection are passed to the relevant stream by a channel, in cases where a stream receives frames (HEADERS are most likely), but the Handler is busy, the stream can't receive from the channel.

This means that the connection will block and stop processing inbound frames. Since sending occurs in a separate goroutine, the connection will continue to be able to send. However, No streams will receive further frames.

Although the cause of the bug has been identified, the solution is non-trivial. Using a buffered channel would help many cases, but if a stream's Handler is busy for some time and the stream receives lots of inbound frames, the buffer could become filled, blocking the connection.