Skip to content

Commit 81549e0

Browse files
committed
PYTHON-898 - Fix case of getmore with removed RS member.
1 parent 2cc3705 commit 81549e0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pymongo/topology.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,8 @@ def _apply_selector(self, selector, address):
308308
# Ignore the selector.
309309
return self._description.known_servers
310310
elif address:
311-
return [self._description.server_descriptions().get(address)]
311+
sd = self._description.server_descriptions().get(address)
312+
return [sd] if sd else []
312313
elif self._description.topology_type == TOPOLOGY_TYPE.Sharded:
313314
return apply_local_threshold(self._settings.local_threshold_ms,
314315
self._description.known_servers)

0 commit comments

Comments
 (0)