prevent memory leaks from error in _broadcast_queue_data

This commit is contained in:
Timothy Pogue 2022-11-02 18:00:10 -06:00
parent cbede2e27d
commit 000b0c2198

View File

@ -211,6 +211,9 @@ class ApiServer(RPCHandler):
# Disconnect channels and stop the loop on cancel
await self._ws_channel_manager.disconnect_all()
self._ws_loop.stop()
# Avoid adding more items to the queue if they aren't
# going to get broadcasted.
self._ws_queue = None
def start_api(self):
"""