2
0
mirror of https://github.com/soheilhy/cmux.git synced 2026-08-04 15:12:42 +08:00
Files
cmux/buffer.go
Soheil Hassas Yeganeh d5924ef0b4 Fix a blocking issue in buffer reader
After sniffing and buffering data, if we try to read from
the socket again, bufio.Reader may block. This breaks HTTP handlers
in go1.5.2+ if one tries on browsers or with curl. Go's HTTP client,
however, is not broken. This issue is also there with TeeReader.

Return immediately with the data in the sniffed buffer.
2016-04-24 12:55:13 -04:00

1.2 KiB