Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

stop

Signal shutdown and close the underlying WebSocket.

Signature

def stop(self) -> None

Example

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=...) after stop() if you need to block.

See also