Skip to content

Commit ca1d208

Browse files
committed
Fix overflow calculation
1 parent 0abdcc0 commit ca1d208

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pymongo/network_layer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ def buffer_updated(self, nbytes: int) -> None:
604604
self._expecting_header = False
605605
if self._body_length > self._buffer_size:
606606
self._overflow = memoryview(
607-
bytearray(self._body_length - (self._buffer_size - nbytes) + 1000)
607+
bytearray(self._body_length - (self._length + nbytes) + 1024)
608608
)
609609
self._length += nbytes
610610
if (

0 commit comments

Comments
 (0)