We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent deb9a57 commit a219173Copy full SHA for a219173
src/main/kotlin/ru/gildor/coroutines/retrofit/CallAwait.kt
@@ -101,11 +101,10 @@ public suspend fun <T : Any> Call<T>.awaitResult(): Result<T> {
101
102
private fun Call<*>.registerOnCompletion(continuation: CancellableContinuation<*>) {
103
continuation.invokeOnCancellation {
104
- if (continuation.isCancelled)
105
- try {
106
- cancel()
107
- } catch (ex: Throwable) {
108
- //Ignore cancel exception
109
- }
+ try {
+ cancel()
+ } catch (ex: Throwable) {
+ //Ignore cancel exception
+ }
110
}
111
0 commit comments