diff options
author | Joffrey Bion <joffrey.bion@booking.com> | 2020-06-15 09:14:57 +0200 |
---|---|---|
committer | Joffrey Bion <joffrey.bion@booking.com> | 2020-06-15 09:14:57 +0200 |
commit | bb0c850c5630b454d8008e751860db00d21031e9 (patch) | |
tree | 8b5800242ecd7bb915705a26478afd1c8eb09e69 /sw-client/src | |
parent | Cleanup (diff) | |
download | seven-wonders-bb0c850c5630b454d8008e751860db00d21031e9.tar.gz seven-wonders-bb0c850c5630b454d8008e751860db00d21031e9.tar.bz2 seven-wonders-bb0c850c5630b454d8008e751860db00d21031e9.zip |
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.
Diffstat (limited to 'sw-client/src')
-rw-r--r-- | sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |