Maybe help with fixing heartbeat timeouts

parent 9514bd18
Pipeline #239 passed with stages
in 16 minutes and 49 seconds
......@@ -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)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment