private boolean isRecoverable(IOException e, boolean requestSendStarted) {
....
// If there was an interruption don't recover, but if there was a
//timeout connecting to a route
// we should try the next route (if there is one).
if (e instanceof InterruptedIOException) {
return e instanceof SocketTimeoutException && !requestSendStarted;
}
....
return true;
}
Here is the code snippet in RetryAndFollowUpInterceptor in OKHttp.
My question is why OkHttp not retry when SocketTimeoutException and requestSendStarted == true?
Because I think if there are some other routers, we can retry another ip or router