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:
2915
2915
and conn .supports_sessions
2916
2916
)
2917
2917
is_mongos = conn .is_mongos
2918
- if not sessions_supported :
2918
+ if not self . _always_retryable and not sessions_supported :
2919
2919
# A retry is not possible because this server does
2920
2920
# not support sessions raise the last error.
2921
2921
self ._check_last_error ()
Original file line number Diff line number Diff line change @@ -2905,7 +2905,7 @@ def _write(self) -> T:
2905
2905
and conn .supports_sessions
2906
2906
)
2907
2907
is_mongos = conn .is_mongos
2908
- if not sessions_supported :
2908
+ if not self . _always_retryable and not sessions_supported :
2909
2909
# A retry is not possible because this server does
2910
2910
# not support sessions raise the last error.
2911
2911
self ._check_last_error ()
You can’t perform that action at this time.
0 commit comments