Skip to content

Commit 7982b71

Browse files
Add setting connected_event flag in libevreactor
Before, the connected_event flag was set in every implementation of Connection but this utilizing libev. Other reactors have the same `self.error_all_requests(ConnectionShutdown(...))` logic, but they have `self.connected_event.set()` after that, so it was probably an oversight (copy-paste mistake?) that it was missing from this reactor. That was causing the driver to sometimes hang for >3 minutes when shutting down. This commit adds setting the `connected_event` flag in `close()` in `LibevConnection`.
1 parent 810291f commit 7982b71

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cassandra/io/libevreactor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ def close(self):
294294
if not self.is_defunct:
295295
self.error_all_requests(
296296
ConnectionShutdown("Connection to %s was closed" % self.endpoint))
297+
self.connected_event.set()
297298

298299
def handle_write(self, watcher, revents, errno=None):
299300
if revents & libev.EV_ERROR:

0 commit comments

Comments
 (0)