Update libsession/src/main/java/org/session/libsession/snode/utilities/PromiseUtil.kt

Co-authored-by: Andrew <andrewgallasch@gmail.com>
This commit is contained in:
ThomasSession 2024-07-30 15:14:09 +10:00 committed by GitHub
parent 7a8e1309fb
commit a594952832
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,7 +7,7 @@ import kotlin.coroutines.suspendCoroutine
suspend fun <T, E: Throwable> Promise<T, E>.await(): T {
return suspendCoroutine { cont ->
success { cont.resume(it) }
fail { cont.resumeWithException(it) }
success(cont::resume)
fail(cont::resumeWithException)
}
}