Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event listeners are not closed correctly during connection close #8

Open
mehaase opened this issue Mar 13, 2020 · 0 comments
Open

Event listeners are not closed correctly during connection close #8

mehaase opened this issue Mar 13, 2020 · 0 comments

Comments

@mehaase
Copy link
Contributor

mehaase commented Mar 13, 2020

In #5 I added aclose() to the connection class so that the underlying WebSocket can be closed, and future calls to conn.execute() will raise ConnectionClosed. This is not quite enough cleanup, however, because the sessions belonging to that connection are not torn down. For example, if a caller is inside an async for session.listen(...): loop, I believe that loop will currently hang forever, because it does not receive a signal that the connection is closed. The proper behavior would be to close all open channels, which will cause all async for session.listen(...) loops to exit gracefully.

There may be other, similar issues regarding session tear-down.

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

No branches or pull requests

1 participant