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 e608edc commit 46eb1c8Copy full SHA for 46eb1c8
core/connection/connection.go
@@ -699,7 +699,7 @@ func (c *connection) ReadWireMessage(ctx context.Context) (wiremessage.WireMessa
699
700
// Isn't the best reuse, but resizing a []byte to be larger
701
// is difficult.
702
- if len(c.readBuf) > int(size) {
+ if cap(c.readBuf) > int(size) {
703
c.readBuf = c.readBuf[:size]
704
} else {
705
c.readBuf = make([]byte, size)
0 commit comments