Skip to content

Commit

Permalink
guard against too short timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbonnin committed Mar 4, 2024
1 parent c8f0cdd commit 1e13985
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ internal class WebSocketHolder(
private var lock = reentrantLock()

init {
// Make sure we do not busy loop
check(idleTimeoutMillis > 0) {
"Apollo: 'idleTimeoutMillis' must be > 0"
}
triggerCleanup(timeoutMillis = idleTimeoutMillis)
}

Expand Down

0 comments on commit 1e13985

Please sign in to comment.