Skip to content

protocol: io.MultiReader stuck on bufio.Reader.Read(b) #147

@pires

Description

@pires

io.MultiReader only advances to the next reader when the current reader returns io.EOF. A bufio.Reader wrapping an open net.Conn will not return EOF when its buffer is empty; it will instead read more data from the underlying connection to refill its buffer. This results in the io.MultiReader to get stuck on the bufio.Reader for the entire lifetime of the connection, which effectively makes the direct conn.Read(b) unreachable dead code.

For more info, see #142 #123 #120 #119

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions