diff --git a/gateway/src/commonMain/kotlin/ratelimit/IdentifyRateLimiter.kt b/gateway/src/commonMain/kotlin/ratelimit/IdentifyRateLimiter.kt index c75444ef8df7..c3e7b008391e 100644 --- a/gateway/src/commonMain/kotlin/ratelimit/IdentifyRateLimiter.kt +++ b/gateway/src/commonMain/kotlin/ratelimit/IdentifyRateLimiter.kt @@ -81,7 +81,7 @@ private class IdentifyRateLimiterImpl( // if the coroutine that called consume() is cancelled, the CancellableContinuation makes sure the waiting is // stopped (the Gateway won't try to identify), so we don't need to hold the mutex and waste time for other // calls - suspendCancellableCoroutine { continuation -> + return suspendCancellableCoroutine { continuation -> val job = launchIdentifyWaiter(shardId, events, continuation) continuation.invokeOnCancellation { job.cancel() } }