Przeglądaj źródła

Merge remote-tracking branch 'origin/master'

kunfei 4 lat temu
rodzic
commit
01ddcefbbd

+ 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