Prevent recvBufferSizeLimit from overflowing signed 32-bit integer

pull/158/head
Andy Wang 3 years ago
parent f27889af11
commit 32494b8d86
No known key found for this signature in database
GPG Key ID: 181B49F9F38F3374

@ -25,4 +25,4 @@ type recvBuffer interface {
// size we want the amount of unread data in buffer to grow before recvBuffer.Write blocks.
// If the buffer grows larger than what the system's memory can offer at the time of recvBuffer.Write,
// a panic will happen.
const recvBufferSizeLimit = 1 << 31
const recvBufferSizeLimit = 1<<31 - 1

Loading…
Cancel
Save