Skip to content

Conversation

sylwiaszunejko
Copy link
Collaborator

Before, the connected_event flag was set in every implementation of Connection but this utilizing libev. That was causing the driver to sometimes hang for >3 minutes when shutting down.

This PR adds setting the connected_event flag in close() in LibevConnection.

Fixes: #172

Copy link

@avelanarius avelanarius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, you should add the description of PR to the commit message and you should add that 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.

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`.
@sylwiaszunejko
Copy link
Collaborator Author

I updated the commit message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Driver hanging for >3 minutes when shutting down

3 participants