fix: automatically reconnect after losing a WebSocket connection
Some checks failed
conventional pull request title check / conventional pull request title check (pull_request) Successful in 3s
dotenv-linter check / dotenv-linter check (pull_request) Successful in 5s
GitLeaks check / GitLeaks check (pull_request) Successful in 9s
hadolint check / hadolint check (pull_request) Successful in 9s
Rust check / Rust check (pull_request) Failing after 4s
htmlhint check / htmlhint check (pull_request) Successful in 31s
markdownlint check / markdownlint check (pull_request) Successful in 29s
Prettier check / Prettier check (pull_request) Successful in 31s
ShellCheck check / ShellCheck check (pull_request) Successful in 26s
checkov check / checkov check (pull_request) Failing after 8s
actionlint check / actionlint check (pull_request) Successful in 11s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 7s
yamllint check / yamllint check (pull_request) Successful in 27s
Stylelint check / Stylelint check (pull_request) Successful in 33s

This commit is contained in:
2026-01-10 12:03:48 +01:00
parent 5085791f45
commit 415e001076

View File

@@ -40,7 +40,8 @@ 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;