Only make large blob downloading sensitive for cancelling
This commit is contained in:
1 parent
13b532c12a
commit
10b6258175
1 file changed
+2
-2
@@ -102,11 +102,11 @@ suspend inline fun <R> Call.usingCancellable(crossinline block: Response.() -> R
|
||||
}
|
||||
}
|
||||
|
||||
suspend inline fun <R> Request.execute(crossinline block: Response.() -> R): R {
|
||||
suspend inline fun <R> Request.execute(block: Response.() -> R): R {
|
||||
contract {
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
|
||||
}
|
||||
return okHttpClient.newCall(this).usingCancellable(block)
|
||||
return okHttpClient.newCall(this).executeAsync().use(block)
|
||||
}
|
||||
|
||||
suspend inline fun <R> Request.executeNonCache(crossinline block: Response.() -> R): R {
|
||||
|
||||
Reference in new issue
Block a user