Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for noTimeout (0.1 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/WholeOperationTimeoutTest.kt

          call.execute()
        }.also { expected ->
          assertThat(expected.message).isEqualTo("timeout")
          assertThat(call.isCanceled()).isTrue()
        }
      }
    
      @Flaky
      @Test
      fun noTimeout() {
        // Flaky https://github.com/square/okhttp/issues/5304
        server.enqueue(
          MockResponse
            .Builder()
            .headersDelay(250, TimeUnit.MILLISECONDS)
            .body(BIG_ENOUGH_BODY)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 10.6K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/-UtilJvm.kt

     * @param source the source used to read bytes from the socket.
     */
    internal fun Socket.isHealthy(source: BufferedSource): Boolean =
      try {
        val readTimeout = soTimeout
        try {
          soTimeout = 1
          !source.exhausted()
        } finally {
          soTimeout = readTimeout
        }
      } catch (_: SocketTimeoutException) {
        true // Read timed out; socket is good.
      } catch (_: IOException) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 10.2K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealConnection.kt

        } else {
          javaNetSocket.soTimeout = chain.readTimeoutMillis()
          okHttpSocket.source.timeout().timeout(chain.readTimeoutMillis.toLong(), MILLISECONDS)
          okHttpSocket.sink.timeout().timeout(chain.writeTimeoutMillis.toLong(), MILLISECONDS)
          Http1ExchangeCodec(client, this, okHttpSocket)
        }
      }
    
      internal fun useAsSocket() {
        javaNetSocket.soTimeout = 0
        noNewExchanges()
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 14.9K bytes
    - Viewed (0)
  4. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/ConnectPlan.kt

        this.rawSocket = rawSocket
    
        // Handle the race where cancel() precedes connectSocket(). We don't want to miss a cancel.
        if (canceled) {
          throw IOException("canceled")
        }
    
        rawSocket.soTimeout = socketReadTimeoutMillis
        try {
          Platform.get().connectSocket(rawSocket, route.socketAddress, socketConnectTimeoutMillis)
        } catch (e: ConnectException) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 18.6K bytes
    - Viewed (0)
Back to top