Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for retryTlsHandshake (0.12 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/connection/RetryTlsHandshake.kt

    import javax.net.ssl.SSLException
    import javax.net.ssl.SSLHandshakeException
    import javax.net.ssl.SSLPeerUnverifiedException
    import okio.IOException
    
    /** Returns true if a TLS connection should be retried after [e]. */
    fun retryTlsHandshake(e: IOException): Boolean {
      return when {
        // If there was a protocol problem, don't recover.
        e is ProtocolException -> false
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 07 16:05:34 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/connection/RetryConnectionTest.kt

        val exception = IOException("Non-handshake exception")
        assertThat(retryTlsHandshake(exception)).isFalse()
      }
    
      @Test fun nonRetryableSSLHandshakeException() {
        val exception =
          SSLHandshakeException("Certificate handshake exception").apply {
            initCause(CertificateException())
          }
        assertThat(retryTlsHandshake(exception)).isFalse()
      }
    
      @Test fun retryableSSLHandshakeException() {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

          success = true
          return ConnectResult(plan = this)
        } catch (e: IOException) {
          user.connectFailed(route, null, e)
    
          if (!retryOnConnectionFailure || !retryTlsHandshake(e)) {
            retryTlsConnection = null
          }
    
          return ConnectResult(
            plan = this,
            nextPlan = retryTlsConnection,
            throwable = e,
          )
        } finally {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 18.6K bytes
    - Viewed (0)
Back to top