From c5b47dd555f26fea5f7242b81d9de2c2a065fa76 Mon Sep 17 00:00:00 2001 From: gedoor Date: Tue, 4 May 2021 14:15:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/help/http/OkHttpUtils.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/http/OkHttpUtils.kt b/app/src/main/java/io/legado/app/help/http/OkHttpUtils.kt index b0bcfef18..4dec4bf3e 100644 --- a/app/src/main/java/io/legado/app/help/http/OkHttpUtils.kt +++ b/app/src/main/java/io/legado/app/help/http/OkHttpUtils.kt @@ -28,7 +28,7 @@ suspend fun OkHttpClient.newCall( return response.body!! } } - throw IOException(response?.message ?: "服务器没有响应。") + throw IOException(response!!.message) } suspend fun OkHttpClient.newCallStrResponse( @@ -45,7 +45,7 @@ suspend fun OkHttpClient.newCallStrResponse( return StrResponse(response, response.body!!.text()) } } - throw IOException(response?.message ?: "服务器没有响应。") + throw IOException(response!!.message) } suspend fun Call.await(): Response = suspendCancellableCoroutine { block ->