8888 _async_create_lock ,
8989 _release_locks ,
9090)
91- from pymongo .logger import _CLIENT_LOGGER , _log_or_warn
91+ from pymongo .logger import _CLIENT_LOGGER , _log_client_error , _log_or_warn
9292from pymongo .message import _CursorAddress , _GetMore , _Query
9393from pymongo .monitoring import ConnectionClosedReason
9494from pymongo .operations import (
@@ -2049,7 +2049,7 @@ async def _process_kill_cursors(self) -> None:
20492049 # can be caught in _process_periodic_tasks
20502050 raise
20512051 else :
2052- helpers_shared . _handle_exception ()
2052+ _log_client_error ()
20532053
20542054 # Don't re-open topology if it's closed and there's no pending cursors.
20552055 if address_to_cursor_ids :
@@ -2061,7 +2061,7 @@ async def _process_kill_cursors(self) -> None:
20612061 if isinstance (exc , InvalidOperation ) and self ._topology ._closed :
20622062 raise
20632063 else :
2064- helpers_shared . _handle_exception ()
2064+ _log_client_error ()
20652065
20662066 # This method is run periodically by a background thread.
20672067 async def _process_periodic_tasks (self ) -> None :
@@ -2075,7 +2075,7 @@ async def _process_periodic_tasks(self) -> None:
20752075 if isinstance (exc , InvalidOperation ) and self ._topology ._closed :
20762076 return
20772077 else :
2078- helpers_shared . _handle_exception ()
2078+ _log_client_error ()
20792079
20802080 def _return_server_session (
20812081 self , server_session : Union [_ServerSession , _EmptyServerSession ]
0 commit comments