larksuite-oapi/src/main/java/com/larksuite/oapi/okhttp3_14/internal/http/RetryAndFollowUpInterceptor.java
private boolean recover(IOException e, Transmitter transmitter,
      boolean requestSendStarted, Request userRequest) {
    // The application layer has forbidden retries.
    if (!client.retryOnConnectionFailure()) return false;

    // We can't send the request body again.
    if (requestSendStarted && requestIsOneShot(e, userRequest)) return false;

    // This exception is fatal.
    if (!isRecoverable(e, requestSendStarted)) return false;

    // No more routes to attempt.
    if (!transmitter.canRetry()) return false;

    // For failure recovery, use the same route selector with a new connection.
    return true;
  }
/**
   * Report and attempt to recover from a failure to communicate with a server. Returns true if
   * {@code e} is recoverable, or false if the failure is permanent. Requests with a body can only
   * be recovered if the body is buffered or if the failure occurred before the request has been
   * sent.
   */
Report and attempt to recover from a failure to communicate with a server. Returns true if
e is recoverable, or false if the failure is permanent. Requests with a body can only
be recovered if the body is buffered or if the failure occurred before the request has been
sent.
Report and attempt to recover from a failure to communicate with a server . Returns true if e is recoverable or false if the failure is permanent . Requests with a body can only be recovered if the body is buffered or if the failure occurred before the request has been sent .
private boolean recover(IOException e, Transmitter transmitter,
      boolean requestSendStarted, Request userRequest) {
    if (!client.retryOnConnectionFailure()) return false;
    if (requestSendStarted && requestIsOneShot(e, userRequest)) return false;
    if (!isRecoverable(e, requestSendStarted)) return false;
    if (!transmitter.canRetry()) return false;
    return true;
  }
private boolean recover ( IOException e , Transmitter transmitter , boolean requestSendStarted , Request userRequest ) { if ( ! client . retryOnConnectionFailure ( ) ) return false ; if ( requestSendStarted && requestIsOneShot ( e , userRequest ) ) return false ; if ( ! isRecoverable ( e , requestSendStarted ) ) return false ; if ( ! transmitter . canRetry ( ) ) return false ; return true ; }
Report and attempt to recover from a failure to communicate with a server.
Report and attempt to recover from a failure to communicate with a server .
// The application layer has forbidden retries. // We can't send the request body again. // This exception is fatal. // No more routes to attempt. // For failure recovery, use the same route selector with a new connection.