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

Co-authored-by: Andrew <andrewgallasch@gmail.com>
pull/1583/head
ThomasSession 8 months ago committed by GitHub
parent 7a8e1309fb
commit a594952832
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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)
}
}
Loading…
Cancel
Save