We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0b3d6eb commit fcc06e5Copy full SHA for fcc06e5
pymongo/topology_description.py
@@ -83,17 +83,7 @@ def has_server(self, address):
83
84
def reset_server(self, address):
85
"""A copy of this description, with one server marked Unknown."""
86
- sds = self.server_descriptions()
87
-
88
- # The default ServerDescription's type is Unknown.
89
- sds[address] = ServerDescription(address)
90
91
- if self._topology_type == TOPOLOGY_TYPE.ReplicaSetWithPrimary:
92
- topology_type = _check_has_primary(sds)
93
- else:
94
- topology_type = self._topology_type
95
96
- return TopologyDescription(topology_type, sds, self._replica_set_name)
+ return updated_topology_description(self, ServerDescription(address))
97
98
def reset(self):
99
"""A copy of this description, with all servers marked Unknown."""
0 commit comments