diff --git a/common/net/bufconn.go b/common/net/bufconn.go index cb7433d2e..a50c7f030 100644 --- a/common/net/bufconn.go +++ b/common/net/bufconn.go @@ -11,6 +11,9 @@ type BufferedConn struct { } func NewBufferedConn(c net.Conn) *BufferedConn { + if bc, ok := c.(*BufferedConn); ok { + return bc + } return &BufferedConn{bufio.NewReader(c), c} }