okhttp的坑坑坑 unexpected end of stream on Connection
来源:互联网 发布:天刀男性捏脸数据 编辑:程序博客网 时间:2024/06/05 09:53
之前okhttp用着没问题 很爽 突然不知道改了那 就一直报这个错误
W/System.err: java.io.IOException: unexpected end of stream on Connection{app.zhicall.cn:443, proxy=DIRECT@ hostAddress=app.zhicall.cn/101.37.43.190:443 cipherSuite=T
W/System.err: at okhttp3.internal.http1.Http1Codec.readResponseHeaders(Http1Codec.java:205)
W/System.err: at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:75)
W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
W/System.err: at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
W/System.err: at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
W/System.err: at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
W/System.err: at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
W/System.err: at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
W/System.err: at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
W/System.err: at okhttp3.RealCall$AsyncCall.execute(RealCall.java:135)
W/System.err: at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
W/System.err: at java.lang.Thread.run(Thread.java:818)
W/System.err: Caused by: java.io.EOFException: \n not found: limit=0 content=…
W/System.err: at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:227)
W/System.err: at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:211)
W/System.err: at okhttp3.internal.http1.Http1Codec.readResponseHeaders(Http1Codec.java:189)
W/System.err: ... 19 more
然后各种百度 google
给出的答案大部分都是
.header("Connection","close")
但是没解决我的问题
最后找到了一个方法 如下
解决连接
OkHttpClient client = new OkHttpClient.Builder() .retryOnConnectionFailure(true) .build();
- okhttp的坑坑坑 unexpected end of stream on Connection
- 总结okhttp的错误IOException: unexpected end of stream on okhttp3的解决办法
- unexpected end of stream on okhttp3.
- Unexpected end of stream.
- redis报错:jedis connection exception unexpected end of stream
- jedis 的 Unexpected end of stream 解决方案
- unexpected end of stream on okhttp3.Address 错误原因
- java.io.IOException: unexpected end of stream on okhttp3.Address
- android: unexpected end of stream
- onFailure unexpected end of stream
- Unexpected end of ZLIB input stream的解决办法
- Android Download: unexpected end of stream
- JAVA_SAE_Fatal_error: Unexpected end of ZLIB input stream
- Unexpected end of ZLIB input stream
- java.io.IOException: unexpected end of stream
- java.net.ProtocolException: unexpected end of stream
- java.io.IOException: unexpected end of stream on okhttp3.Address@33c2c47
- 使用GZIPOutputStream解压byte[]出现Unexpected end of ZLIB input stream的解决方法
- 在list页面双击显示重叠明细
- 大文件计算MD5值 ——Python
- Codeforces Round #382 (Div. 1) B. Taxes
- time-lock and phase-lock signal
- leetocde 374. Guess Number Higher or Lower
- okhttp的坑坑坑 unexpected end of stream on Connection
- 计算机图形学笔记---Cg语言(一)
- 学习下ACM的题目
- 几种常见的Dialog
- Microsoft c++ Speech 识别接口快速入门
- [LeetCode] Rotate List
- QSettings
- linux tree命令
- ASP.NET MVC 下拉列表实现