Skip to content

Commit 4560d96

Browse files
committed
CP review
1 parent b607bb6 commit 4560d96

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pymongo/asynchronous/mongo_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2931,7 +2931,7 @@ async def run(self) -> T:
29312931
and self._server is not None
29322932
and (
29332933
self._client.topology_description.topology_type_name == "Sharded"
2934-
or exc.has_error_label("SystemOverloadedError")
2934+
or overloaded
29352935
)
29362936
):
29372937
self._deprioritized_servers.append(self._server)

pymongo/synchronous/mongo_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2921,7 +2921,7 @@ def run(self) -> T:
29212921
and self._server is not None
29222922
and (
29232923
self._client.topology_description.topology_type_name == "Sharded"
2924-
or exc.has_error_label("SystemOverloadedError")
2924+
or overloaded
29252925
)
29262926
):
29272927
self._deprioritized_servers.append(self._server)

0 commit comments

Comments
 (0)