We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b80167f commit 7ca69c1Copy full SHA for 7ca69c1
protocol.go
@@ -153,8 +153,8 @@ func (p *Listener) Addr() net.Addr {
153
func NewConn(conn net.Conn, opts ...func(*Conn)) *Conn {
154
// For v1 the header length is at most 108 bytes.
155
// For v2 the header length is at most 52 bytes plus the length of the TLVs.
156
- // We use 256 bytes to be safe.
157
- const bufSize = 256
+ // We use 65535, as it's the maximum length representable by a uint16.
+ const bufSize = 65535
158
br := bufio.NewReaderSize(conn, bufSize)
159
160
pConn := &Conn{
0 commit comments