Skip to content

Commit

Permalink
feat(wamp-server) #76: fixup! while
Browse files Browse the repository at this point in the history
  • Loading branch information
lilgallon committed Sep 17, 2024
1 parent 0064d1f commit 749fc10
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,9 @@ class WampCallManager(
fun await() {
val now = Clock.System.now()
synchronized(this) {
val capturedCurentCall = currentCall
while (
capturedCurentCall != null &&
(Clock.System.now() - now).inWholeMilliseconds < capturedCurentCall.timeoutInMs
currentCall != null &&
(Clock.System.now() - now).inWholeMilliseconds < (currentCall?.timeoutInMs ?: Long.MAX_VALUE)
) {
Thread.sleep(10)
}
Expand Down

0 comments on commit 749fc10

Please sign in to comment.