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

after_this_websocket is not called if the client disconnects? #337

Open
willstott101 opened this issue May 10, 2024 · 0 comments
Open

after_this_websocket is not called if the client disconnects? #337

willstott101 opened this issue May 10, 2024 · 0 comments

Comments

@willstott101
Copy link

I'm trying to use after_this_websocket to cleanup some long-running tasks that go alongside websocket connections. It appears this isn't called reliably enough for me to use it as a cleanup. My server has a memory leak right now and we think it's due to this.

Environment:

  • Python version: Tox 310 311
  • Quart version: 0.19.5 (current git tip)

I have reproduced this behaviour in the Quart tests: willstott101#1 I hope that's enough info to quickly confirm if this is a bug or accepted behaviour. The docs recommend we always re-raise the cancelled error in websockets which makes it impossible for us to use after_this_websocket for cleanup.

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