diff --git a/archive/src/main/kotlin/org/openrs2/archive/cache/CacheDownloader.kt b/archive/src/main/kotlin/org/openrs2/archive/cache/CacheDownloader.kt index 60cf76fb..0855bdb9 100644 --- a/archive/src/main/kotlin/org/openrs2/archive/cache/CacheDownloader.kt +++ b/archive/src/main/kotlin/org/openrs2/archive/cache/CacheDownloader.kt @@ -1,7 +1,7 @@ package org.openrs2.archive.cache import dev.openrs2.net.BootstrapFactory -import dev.openrs2.net.suspend +import dev.openrs2.net.awaitSuspend import javax.inject.Inject import javax.inject.Singleton import kotlin.coroutines.suspendCoroutine @@ -22,7 +22,7 @@ public class CacheDownloader @Inject constructor( .connect(hostname, port) } } finally { - group.shutdownGracefully().suspend() + group.shutdownGracefully().awaitSuspend() } } } diff --git a/net/src/main/kotlin/dev/openrs2/net/FutureExtensions.kt b/net/src/main/kotlin/dev/openrs2/net/FutureExtensions.kt index 1fc3c9ef..edb60306 100644 --- a/net/src/main/kotlin/dev/openrs2/net/FutureExtensions.kt +++ b/net/src/main/kotlin/dev/openrs2/net/FutureExtensions.kt @@ -5,7 +5,7 @@ import kotlin.coroutines.resume import kotlin.coroutines.resumeWithException import kotlin.coroutines.suspendCoroutine -public suspend fun Future.suspend(): V { +public suspend fun Future.awaitSuspend(): V { if (isDone) { if (isSuccess) { return now