stop
Signal shutdown and close the underlying WebSocket.
Signature
def stop(self) -> NoneExample
from dango.websocket_manager import WebsocketManager
manager = WebsocketManager("https://api-mainnet.dango.zone")
manager.start()
# ... do work ...
manager.stop()
manager.join(timeout=5.0)Notes
- Sets an internal stop event, then calls
ws.close(). The keepalive thread wakes up on the event and exits;run_forever()returns shortly after. - Does NOT wait for the thread to fully exit — call
manager.join(timeout=...)afterstop()if you need to block.
See also
run— the thread entry pointInfo.disconnect_websocket— the high-level wrapper that does stop + join