File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2915,7 +2915,7 @@ async def _write(self) -> T:
29152915 and conn .supports_sessions
29162916 )
29172917 is_mongos = conn .is_mongos
2918- if not sessions_supported :
2918+ if not self . _always_retryable and not sessions_supported :
29192919 # A retry is not possible because this server does
29202920 # not support sessions raise the last error.
29212921 self ._check_last_error ()
Original file line number Diff line number Diff line change @@ -2905,7 +2905,7 @@ def _write(self) -> T:
29052905 and conn .supports_sessions
29062906 )
29072907 is_mongos = conn .is_mongos
2908- if not sessions_supported :
2908+ if not self . _always_retryable and not sessions_supported :
29092909 # A retry is not possible because this server does
29102910 # not support sessions raise the last error.
29112911 self ._check_last_error ()
You can’t perform that action at this time.
0 commit comments