fix: ping every 5min (was 5s), clean endpoint on failure, never block connect
- 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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user