Skip to content
Snippets Groups Projects
Verified Commit 76184a3c authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Maybe help with fixing heartbeat timeouts

parent 9514bd18
Branches
Tags
No related merge requests found
Pipeline #
......@@ -11,7 +11,6 @@ class HeartBeatThread(private val session: Session) : Thread() {
private var lastHeartBeatReply: Instant = Instant.now()
override fun run() {
while (running) {
Thread.sleep(30_000)
val now = Instant.now()
val duration = Duration.between(lastHeartBeatReply, now).toMillis()
if (duration > TIMEOUT) {
......@@ -21,6 +20,7 @@ class HeartBeatThread(private val session: Session) : Thread() {
log(INFO, "Heartbeat", "Sending Heartbeat")
session.dispatch(SignalProxyMessage.HeartBeat(now))
}
Thread.sleep(30_000)
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment