fix: automatically reconnect after losing a WebSocket connection
All checks were successful
actionlint check / actionlint check (pull_request) Successful in 13s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 13s
conventional pull request title check / conventional pull request title check (pull_request) Successful in 7s
dotenv-linter check / dotenv-linter check (pull_request) Successful in 21s
GitLeaks check / GitLeaks check (pull_request) Successful in 27s
hadolint check / hadolint check (pull_request) Successful in 15s
checkov check / checkov check (pull_request) Successful in 1m6s
htmlhint check / htmlhint check (pull_request) Successful in 30s
markdownlint check / markdownlint check (pull_request) Successful in 26s
Prettier check / Prettier check (pull_request) Successful in 25s
Stylelint check / Stylelint check (pull_request) Successful in 46s
ShellCheck check / ShellCheck check (pull_request) Successful in 1m21s
yamllint check / yamllint check (pull_request) Successful in 1m38s
Rust check / Rust check (pull_request) Successful in 22m47s

This commit is contained in:
2026-01-10 12:03:48 +01:00
parent c23397a941
commit 791e93f79f

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;