hegaojian / MvvmHelper

:chicken::basketball:这是一个快速开发的框架,Kotlin语言开发,MVVM+Jetpack架构,封装了公共头部、界面状态管理、ViewModel、LiveData、DataBinding、ViewBinding头部刷新、加载更多、沉浸式、全局通知、丰富好用的拓展函数、RxHttp网络请求等等一系列工具
Apache License 2.0
417 stars 60 forks source link

在执行下载任务的时候,发生了奔溃报错java.lang.IllegalStateException: closed,是在拦截器chain.proceed(request) #12

Closed LnLooFa closed 3 years ago

LnLooFa commented 3 years ago

2021-07-22 15:17:25.895 26284-26954/com.brook.im.xxx E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher Process: com.brook.im.xxx, PID: 26284 java.lang.IllegalStateException: closed at okio.RealBufferedSink.write(RealBufferedSink.kt:142) at okio.ForwardingSink.write(ForwardingSink.kt:29) at rxhttp.wrapper.progress.ProgressRequestBody$1.write(ProgressRequestBody.java:99) at okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.kt:255) at okio.RealBufferedSink.writeAll(RealBufferedSink.kt:194) at okhttp3.RequestBody$Companion$asRequestBody$1.writeTo(RequestBody.kt:167) at rxhttp.wrapper.progress.ProgressRequestBody.writeTo(ProgressRequestBody.java:76) at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:59) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at com.android.tools.profiler.agent.okhttp.OkHttp3Interceptor.intercept(OkHttp3Interceptor.java:57) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at com.hh.library.net.interception.LogInterceptor.intercept(LogInterceptor.kt:49) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at com.hh.library.common.util.MyHeadInterceptor.intercept(MyHeadInterceptor.kt:18) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109) at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201) at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:517) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:764)

LnLooFa commented 3 years ago

已解决,我把rxhttp升级到最新版本就没问题了