diff options
author | engn33r <engn33r@users.noreply.github.com> | 2022-08-26 00:00:00 +0000 |
---|---|---|
committer | engn33r <engn33r@users.noreply.github.com> | 2022-08-26 00:00:00 +0000 |
commit | cc09510e594c5d7ebe311098982429d6b19d723b (patch) | |
tree | d57c6a5fe69a4579374b935e2e640fa3415dc097 | |
parent | 0c9ea4aa92aad5cf15a0407a7b106c9f7d4625c8 (diff) | |
download | websocket-client-cc09510e594c5d7ebe311098982429d6b19d723b.tar.gz |
Clarify run_forever case when server closes WebSocket
-rw-r--r-- | README.md | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -71,9 +71,13 @@ Many more examples are found in the ### Long-lived Connection Most real-world WebSockets situations involve longer-lived connections. -The WebSocketApp `run_forever` loop will automatically try to reconnect when a +The WebSocketApp `run_forever` loop will automatically try to reconnect +to an open WebSocket connection when a network connection is lost if it is provided with a dispatcher parameter, and provides a variety of event-based connection controls. +`run_forever` does not automatically reconnect if the server +closes the WebSocket. Customizing behavior when the server closes +the WebSocket should be handled in the `on_close` callback. This example uses [rel](https://github.com/bubbleboy14/registeredeventlistener) for the dispatcher to provide automatic reconnection. |