docs: boolean connectionFailed(IOException e) {
      // Any future attempt to connect using this strategy will be a fallback attempt.
      isFallback = true;
  
      if (!isFallbackPossible) {
        return false;
      }
  
      // If there was a protocol problem, don't recover.
      if (e instanceof ProtocolException) {
        return false;
      }
  
      // If there was an interruption or timeout (SocketTimeoutException), don't recover.
      // For the socket connect timeout case we do not try the same host with a different
      // ConnectionSpec: we assume it is unreachable.
      if (e instanceof InterruptedIOException) {
        return false;
      }
  
      // Look for known client-side or negotiation errors that are unlikely to be fixed by trying
      // again with a different connection spec.
      if (e instanceof SSLHandshakeException) {
        // If the problem was a CertificateException from the X509TrustManager, do not retry.
        if (e.getCause() instanceof CertificateException) {
          return false;
        }
      }
      if (e instanceof SSLPeerUnverifiedException) {
        // e.g. a certificate pinning error.
        return false;
      }
  
      // Retry for all other SSL failures.
      return e instanceof SSLException;
    }