我刚刚遇到了一个完全相同的错误:java.net.ProtocolException: Too many follow-up requests: 21。出于...
使用Retrofit, okhttp时报 Too many follow-up requests: 21解决 使用retrofit 遇到 Too many follow-up requests: 21这个错误,百度了好久也没有查出什么结果。 错误信息 当然这个错误是okhttp报出来的。公司传参都是经过加密的,好不好直接在浏览器和测试接口工具上测试。而再三打印也是这个错误。也不知道这个错误是...
但是上线后发现调用外网url时并没有调用成功,且报了如下异常:Too many follow-up requests:21 image.png 分析 寻找改异常的错误位置: okhttp3.internal.http.RetryAndFollowUpInterceptor#intercept 是在okhttp3的调用责任链中的第一个拦截器:RetryAndFollowUpInterceptor。所有拦截器按顺序为 重试及重定向拦截器RetryAnd...
this.forWebSocket) {43this.streamAllocation.release();44}4546returnresponse;47}4849Util.closeQuietly(response.body());50++followUpCount;51if(followUpCount > 20) {52this.streamAllocation.release();53thrownewProtocolException("Too many follow-up requests: " +followUpCount);54}5556if(followUp.body(...
The error I got back was: java.net.ProtocolException: Too many follow-up requests: 21 Btw, I tried the exact same command (as used in the code, but then using curl and that is working fine. I should be able to get back to you later today. yschimke commented on Oct 21, 2021 ysch...
throw new ProtocolException("Too many follow-up requests: " + followUpCount); } request = followUp; priorResponse = response; } } 每一个责任链对象都对应一个拦截器,比如在我们没有自定义拦截器时,初始责任链0对应拦截器集合索引0,也就是重试拦截器,在重试拦截器的intercept中又调用下一个责任链对象1的...
if (++followUpCount > MAX_FOLLOW_UPS) { streamAllocation.release(); throw new ProtocolException("Too many follow-up requests: " + followUpCount); } if (followUp.body() instanceof UnrepeatableRequestBody) { streamAllocation.release();
However, a request to example.com/picture.jpg gives me a java.net.ProtocolException: Too many follow-up requests: 21. I'm only a few days into Android development, but this is what I could find so far: followUp request responses in RetryAndFollowUpInterceptor all are correctly set to ...
Request followUp=followUpRequest(response);if(followUp ==null) {if(!forWebSocket) { streamAllocation.release(); }returnresponse; } closeQuietly(response.body());if (++followUpCount > MAX_FOLLOW_UPS) { streamAllocation.release(); throw new ProtocolException("Too many follow-up requests: " + ...
if (followUp == null) { if (!forWebSocket) { streamAllocation.release(); } return response; } closeQuietly(response.body()); //跟随次数判断 if (++followUpCount > MAX_FOLLOW_UPS) { streamAllocation.release(); throw new ProtocolException("Too many follow-up requests: " + followUpCount);...