Skip to content

Commit ea4835f

Browse files
committed
PYTHON-4324 Propagate enable_pending when completing a pending read to allow one to span multiple requests
1 parent c7a4ba2 commit ea4835f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pymongo/asynchronous/pool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ async def complete_pending(self) -> None:
218218
await self.receive_message(None, True)
219219
else:
220220
try:
221-
network_layer.receive_data(self, self.pending_bytes, deadline) # type:ignore[arg-type]
221+
network_layer.receive_data(self, self.pending_bytes, deadline, True) # type:ignore[arg-type]
222222
except BaseException as error:
223223
await self._raise_connection_failure(error)
224224
self.pending_response = False

pymongo/synchronous/pool.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def complete_pending(self) -> None:
218218
self.receive_message(None, True)
219219
else:
220220
try:
221-
network_layer.receive_data(self, self.pending_bytes, deadline) # type:ignore[arg-type]
221+
network_layer.receive_data(self, self.pending_bytes, deadline, True) # type:ignore[arg-type]
222222
except BaseException as error:
223223
self._raise_connection_failure(error)
224224
self.pending_response = False

0 commit comments

Comments
 (0)