-
[RealCall.java]
-
@Override protected void execute() {
-
boolean signalledCallback = false;
-
try {
-
Response response = getResponseWithInterceptorChain();
-
if (retryAndFollowUpInterceptor.isCanceled()) {
-
signalledCallback = true;
-
responseCallback.onFailure(RealCall.this, new IOException(“Canceled”));
-
} else {
-
signalledCallback = true;
-
responseCallback.onResponse(RealCall.this, response);
-
}
-
} catch (IOException e) {
-
if (signalledCallback) {
-
// Do not signal the callback twice!
-
Platform.get().log(INFO, "Callback failure for " + toLoggableString(), e);
-
} else {
-
responseCallback.onFailure(RealCall.this, e);
OkHttp3源码详解(三) 拦截器,送给正在迷茫的你
最新推荐文章于 2024-07-02 16:42:09 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)