diff --git a/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt b/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt index 77d03476d..23b103832 100644 --- a/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt +++ b/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt @@ -167,8 +167,10 @@ class HttpReadAloudService : BaseReadAloudService(), } } ensureActive() - downloadErrorNo = 0 - return response.body!!.byteStream() + response.body!!.byteStream().let { stream -> + downloadErrorNo = 0 + return stream + } } catch (e: Exception) { when (e) { is CancellationException -> throw e