Skip to content

Commit b1dcfbe

Browse files
committed
Merge branch 'master' of github.com:mongodb/mongo-python-driver
2 parents 2ed2498 + 335b728 commit b1dcfbe

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pymongo/network_layer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,11 +215,11 @@ async def _async_receive_ssl(
215215
while total_read < length:
216216
try:
217217
read = conn.recv_into(mv[total_read:])
218+
if read == 0:
219+
raise OSError("connection closed")
218220
# KMS responses update their expected size after the first batch, stop reading after one loop
219221
if once:
220222
return mv[:read]
221-
if read == 0:
222-
raise OSError("connection closed")
223223
except BLOCKING_IO_ERRORS:
224224
await asyncio.sleep(backoff)
225225
read = 0

requirements/typing.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
mypy==1.11.2
2-
pyright==1.1.383
2+
pyright==1.1.384
33
typing_extensions
44
-r ./encryption.txt
55
-r ./ocsp.txt

0 commit comments

Comments
 (0)