Skip to content

Commit 28afc38

Browse files
committed
address review
1 parent da04fc8 commit 28afc38

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pymongo/network_layer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,8 @@ def connection_made(self, transport: BaseTransport) -> None:
500500

501501
async def read(self, bytes_needed: int) -> bytes:
502502
"""Read up to the requested bytes from this connection."""
503+
# Note: all reads are "up-to" bytes_needed because we don't know if the kms_context
504+
# has processed a Content-Length header and is requesting a response or not.
503505
# Wait for other listeners first.
504506
if len(self._pending_listeners):
505507
await asyncio.gather(*self._pending_listeners)

0 commit comments

Comments
 (0)