fix: ping every 5min (was 5s), clean endpoint on failure, never block connect
Some checks failed
Mirror to GitHub / mirror (push) Failing after 39s
Build Release Binaries / build-amd64 (push) Failing after 3m45s

- Ping interval: 5 minutes (was 5 seconds — too aggressive)
- Rust ping_relay: explicitly close endpoint + shutdown runtime on failure
- Connect button works regardless of ping status (never blocked)
- Ping failure doesn't corrupt engine state

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Siavash Sameni
2026-04-07 11:40:14 +04:00
parent 7973c8c6a3
commit 68b56d9172
2 changed files with 16 additions and 8 deletions

View File

@@ -90,12 +90,13 @@ fun InCallScreen(
var showManageRelays by remember { mutableStateOf(false) }
// Periodic ping every 5 seconds while app is open
// Ping once on launch, then every 5 minutes
LaunchedEffect(Unit) {
viewModel.loadSavedFingerprints()
viewModel.pingAllServers()
while (true) {
kotlinx.coroutines.delay(300_000) // 5 minutes
viewModel.pingAllServers()
kotlinx.coroutines.delay(5000)
}
}