Skip to content

Commit 9478fb7

Browse files
committed
PYTHON-5011 Fix pypy network timeout case
1 parent 6d2620a commit 9478fb7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pymongo/network_layer.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,9 @@ def receive_data(conn: Connection, length: int, deadline: Optional[float]) -> me
388388
except socket.timeout:
389389
if conn.cancel_context.cancelled:
390390
raise _OperationCancelled("operation cancelled") from None
391+
if _PYPY:
392+
# We reached the true deadline.
393+
raise
391394
continue
392395
except OSError as exc:
393396
if conn.cancel_context.cancelled:

0 commit comments

Comments
 (0)