Horis il y a 4 ans
Parent
commit
5ca76f4a78

+ 4 - 2
app/src/main/java/io/legado/app/service/HttpReadAloudService.kt

@@ -167,8 +167,10 @@ class HttpReadAloudService : BaseReadAloudService(),
                     }
                     }
                 }
                 }
                 ensureActive()
                 ensureActive()
-                downloadErrorNo = 0
-                return response.body!!.byteStream()
+                response.body!!.byteStream().let { stream ->
+                    downloadErrorNo = 0
+                    return stream
+                }
             } catch (e: Exception) {
             } catch (e: Exception) {
                 when (e) {
                 when (e) {
                     is CancellationException -> throw e
                     is CancellationException -> throw e