File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -95,14 +95,14 @@ def __init__(self,
95
95
# of known ServerType. If any ServerDescription of known ServerType has
96
96
# a null logicalSessionTimeoutMinutes, then
97
97
# TopologyDescription.logicalSessionTimeoutMinutes MUST be set to null.
98
- known = self .known_servers
99
- if not known :
98
+ readable = [ s for s in self .known_servers if s . is_readable ]
99
+ if not readable :
100
100
self ._ls_timeout_minutes = None
101
- elif any (s .logical_session_timeout_minutes is None for s in known ):
101
+ elif any (s .logical_session_timeout_minutes is None for s in readable ):
102
102
self ._ls_timeout_minutes = None
103
103
else :
104
104
self ._ls_timeout_minutes = min (s .logical_session_timeout_minutes
105
- for s in known )
105
+ for s in readable )
106
106
107
107
def check_compatible (self ):
108
108
"""Raise ConfigurationError if any server is incompatible.
You can’t perform that action at this time.
0 commit comments