Skip to content

Commit 87ee162

Browse files
committed
fix: name session-end webhook backoff constant (detekt)
1 parent 4365f6c commit 87ee162

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/kotlin/org/coralprotocol/coralserver/session/LocalSessionManager.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import kotlin.time.Duration.Companion.milliseconds
2727
import kotlin.time.ExperimentalTime
2828

2929
private const val SESSION_END_WEBHOOK_ATTEMPTS = 3
30+
private const val SESSION_END_WEBHOOK_BACKOFF_MS = 1_000L
3031

3132
data class LocalSessionNamespace(
3233
val name: String,
@@ -294,7 +295,7 @@ class LocalSessionManager(
294295
// A 4xx (bad HMAC/URL/auth) won't self-heal; retry only transport failures and 5xx.
295296
val retryable = status.isFailure || (code != null && code.value in 500..599)
296297
if (!retryable || attempt == SESSION_END_WEBHOOK_ATTEMPTS - 1) return
297-
delay((attempt + 1) * 1000L)
298+
delay((attempt + 1) * SESSION_END_WEBHOOK_BACKOFF_MS)
298299
}
299300
}
300301

0 commit comments

Comments
 (0)