summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorengn33r <engn33r@users.noreply.github.com>2022-08-26 00:00:00 +0000
committerengn33r <engn33r@users.noreply.github.com>2022-08-26 00:00:00 +0000
commitcc09510e594c5d7ebe311098982429d6b19d723b (patch)
treed57c6a5fe69a4579374b935e2e640fa3415dc097
parent0c9ea4aa92aad5cf15a0407a7b106c9f7d4625c8 (diff)
downloadwebsocket-client-cc09510e594c5d7ebe311098982429d6b19d723b.tar.gz
Clarify run_forever case when server closes WebSocket
-rw-r--r--README.md6
1 files changed, 5 insertions, 1 deletions
diff --git a/README.md b/README.md
index 2353b85..66ca0fd 100644
--- a/README.md
+++ b/README.md
@@ -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.