fix: clean up background tasks on close#514
Conversation
|
That would prevent cleaning up the room that was launched here, right? |
|
I don't think so? That is launched by asyncio's create_task, rather than the class helper. |
|
Ah right. |
|
It looks as though there's already some consideration for cleanup in Do we know why this was committed but commented out? |
1ffd612 to
3b7cbcc
Compare
|
It looks like tests did not run because pre-commit failed: |
|
Hi, does this fix the core issue, beyond the pre-commit check (and then maybe tests) any more to do here? |
seemingly no :( I did find that adding a im looking into a cleaner way (maybe moving that to client) shutdown |
|
actually that works somtimes, but not always. very mysterious. i guess there is a race happening somewhere. will keeping digging. |
|
I found the race. will make a pr |
|
fix that works locally for me in #546 |
This PR attempts to close #503 and fix #161 by cleaning up background tasks upon closure of the websocket. I'm not sure if this fits into the wider design space for resource management, but it does fix "hang on shutdown" on my system.