fix: automatically reconnect after losing a WebSocket connection
This commit is contained in:
@@ -40,7 +40,7 @@ where
|
||||
future()
|
||||
});
|
||||
|
||||
let mut socket = use_websocket(|| subscribe_to_updates(WebSocketOptions::default()));
|
||||
let mut socket = use_websocket(|| subscribe_to_updates(WebSocketOptions::new().with_automatic_reconnect()));
|
||||
use_future(move || async move {
|
||||
while socket.recv().await.is_ok() {
|
||||
refresh_tick += 1;
|
||||
|
||||
Reference in New Issue
Block a user