Shorten driver Reverb heartbeat

This commit is contained in:
admin
2026-07-02 16:08:24 +02:00
parent ca512f5993
commit 5555676395
2 changed files with 7 additions and 3 deletions
@@ -25,6 +25,10 @@ class DriverLiveSyncClient(
private val client: OkHttpClient = OkHttpClient(),
private val gson: Gson = Gson(),
) {
private companion object {
const val HEARTBEAT_INTERVAL_MS = 10_000L
}
private val scope = CoroutineScope(SupervisorJob() + Dispatchers.IO)
private val started = AtomicBoolean(false)
private var webSocket: WebSocket? = null
@@ -162,7 +166,7 @@ class DriverLiveSyncClient(
heartbeatJob = scope.launch {
while (started.get()) {
reportRealtimeStatus("connected")
delay(30_000)
delay(HEARTBEAT_INTERVAL_MS)
}
}
}