From bb0c850c5630b454d8008e751860db00d21031e9 Mon Sep 17 00:00:00 2001 From: Joffrey Bion Date: Mon, 15 Jun 2020 09:14:57 +0200 Subject: Widen heart beats margin to prevent failures in slow servers Heroku's cold start may introduce a longer delay for the initial heart beat. Detecting the connection drop in 20s is ok. --- .../kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw-client') diff --git a/sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt b/sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt index 296bc72e..3267773f 100644 --- a/sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt +++ b/sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt @@ -30,7 +30,7 @@ class SevenWondersClient { private val stompClient = StompClient { heartBeat = HeartBeat(10000, 10000) - heartBeatTolerance = HeartBeatTolerance(0, 5000) + heartBeatTolerance = HeartBeatTolerance(0, 10000) // wide margin to account for heroku cold start } suspend fun connect(serverUrl: String): SevenWondersSession { -- cgit