Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for isHealthy (0.23 sec)

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

        }
    
        val http2Connection = this.http2Connection
        if (http2Connection != null) {
          return http2Connection.isHealthy(nowNs)
        }
    
        val idleDurationNs = lock.withLock { nowNs - idleAtNs }
        if (idleDurationNs >= IDLE_CONNECTION_HEALTHY_NS && doExtensiveChecks) {
          return socket.isHealthy(source)
        }
    
        return true
      }
    
      /** Refuse incoming streams. */
      @Throws(IOException::class)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/RealRoutePlanner.kt

        // Make sure this connection is healthy & eligible for new exchanges. If it's no longer needed
        // then we're on the hook to close it.
        val healthy = candidate.isHealthy(connectionUser.doExtensiveHealthChecks())
        var noNewExchangesEvent = false
        val toClose: Socket? =
          candidate.withLock {
            when {
              !healthy -> {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 12K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt

        // When the timeout is sent the connection doesn't immediately go unhealthy.
        assertThat(connection.isHealthy(System.nanoTime())).isTrue()
    
        // But if the ping doesn't arrive, the connection goes unhealthy.
        Thread.sleep(TimeUnit.NANOSECONDS.toMillis(Http2Connection.DEGRADED_PONG_TIMEOUT_NS.toLong()))
        assertThat(connection.isHealthy(System.nanoTime())).isFalse()
    
        // When a pong does arrive, the connection becomes healthy again.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 75.4K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

                  true
                }
              }
            }
          if (!acquired) continue
    
          // Confirm the connection is healthy and return it.
          if (connection.isHealthy(doExtensiveHealthChecks)) return connection
    
          // In the second synchronized block, release the unhealthy acquired connection. We're also on
          // the hook to close this connection if it's no longer in use.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

            if (isShutdown) {
              throw ConnectionShutdownException()
            }
            okHttpSettings.merge(settings)
          }
          writer.settings(settings)
        }
      }
    
      fun isHealthy(nowNs: Long): Boolean {
        this.withLock {
          if (isShutdown) return false
    
          // A degraded pong is overdue.
          if (degradedPongsReceived < degradedPingsSent && nowNs >= degradedPongDeadlineNs) return false
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 32.6K bytes
    - Viewed (0)
Back to top