summaryrefslogtreecommitdiff
path: root/sw-client
diff options
context:
space:
mode:
authorJoffrey Bion <joffrey.bion@booking.com>2020-06-15 09:14:57 +0200
committerJoffrey Bion <joffrey.bion@booking.com>2020-06-15 09:14:57 +0200
commitbb0c850c5630b454d8008e751860db00d21031e9 (patch)
tree8b5800242ecd7bb915705a26478afd1c8eb09e69 /sw-client
parentCleanup (diff)
downloadseven-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')
-rw-r--r--sw-client/src/commonMain/kotlin/org/luxons/sevenwonders/client/SevenWondersClient.kt2
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 {
bgstack15