Skip to content

Commit 472b679

Browse files
committed
Make lbevreactor remove connection from new connections list on discard
WHen connection is destroyed it is not removed from `self._new_conns`, which is why the following error happens: ``` File "/123/cassandra/io/libevreactor.py", line 197, in _loop_will_run conn._read_watcher.start() AttributeError: 'NoneType' object has no attribute 'start' ```
1 parent 77b8684 commit 472b679

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cassandra/io/libevreactor.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ def connection_created(self, conn):
165165

166166
def connection_destroyed(self, conn):
167167
with self._conn_set_lock:
168+
new_conns = self._new_conns.copy()
169+
new_conns.discard(conn)
170+
self._new_conns = new_conns
171+
168172
new_live_conns = self._live_conns.copy()
169173
new_live_conns.discard(conn)
170174
self._live_conns = new_live_conns

0 commit comments

Comments
 (0)