Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pymongo/pyopenssl_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ def _call(self, call: Callable[..., _T], *args: Any, **kwargs: Any) -> _T:
try:
return call(*args, **kwargs)
except BLOCKING_IO_ERRORS as exc:
if is_async:
# Do not retry if the connection is in non-blocking mode.
if is_async or timeout == 0:
raise exc
# Check for closed socket.
if self.fileno() == -1:
Expand Down
Loading