Skip to content

Commit 77b8684

Browse files
committed
Make sure that _read_watcher is not empty before start it
Prevent following to happen: ``` File "cassandra/io/libevreactor.py", line 197, in _loop_will_run conn._read_watcher.start() AttributeError: 'NoneType' object has no attribute 'start' ```
1 parent c233c26 commit 77b8684

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cassandra/io/libevreactor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ def _loop_will_run(self, prepare):
194194
self._new_conns = set()
195195

196196
for conn in to_start:
197-
conn._read_watcher.start()
197+
if conn._read_watcher:
198+
conn._read_watcher.start()
198199

199200
changed = True
200201

0 commit comments

Comments
 (0)