Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for timeout (0.2 sec)

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

      @Volatile private var canceled = false
    
      @Volatile private var exchange: Exchange? = null
      internal val plansToCancel = CopyOnWriteArrayList<RoutePlanner.Plan>()
    
      override fun timeout(): Timeout = timeout
    
      @SuppressWarnings("CloneDoesntCallSuperClone") // We are a final type & this saves clearing state.
      override fun clone(): Call = RealCall(client, originalRequest, forWebSocket)
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt

        return if (http2Connection != null) {
          Http2ExchangeCodec(client, this, chain, http2Connection)
        } else {
          socket.soTimeout = chain.readTimeoutMillis()
          source.timeout().timeout(chain.readTimeoutMillis.toLong(), MILLISECONDS)
          sink.timeout().timeout(chain.writeTimeoutMillis.toLong(), MILLISECONDS)
          Http1ExchangeCodec(client, this, source, sink)
        }
      }
    
      @Throws(SocketException::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)
  3. docs/changelogs/changelog_4x.md

    
    ## Version 4.3.0
    
    _2019-12-31_
    
     *  Fix: Degrade HTTP/2 connections after a timeout. When an HTTP/2 stream times out it may impact
        the stream only or the entire connection. With this fix OkHttp will now send HTTP/2 pings after
        a stream timeout to determine whether the connection should remain eligible for pooling.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

              // No client for CONNECT tunnels:
              client = null,
              carrier = this,
              source = source,
              sink = sink,
            )
          source.timeout().timeout(readTimeoutMillis.toLong(), TimeUnit.MILLISECONDS)
          sink.timeout().timeout(writeTimeoutMillis.toLong(), TimeUnit.MILLISECONDS)
          tunnelCodec.writeRequest(nextRequest.headers, requestLine)
          tunnelCodec.finishRequest()
          val response =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt

          throw InterruptedIOException()
        }
      }
    
      /**
       * The Okio timeout watchdog will call [timedOut] if the timeout is reached. In that case we close
       * the stream (asynchronously) which will notify the waiting thread.
       */
      internal inner class StreamTimeout : AsyncTimeout() {
        override fun timedOut() {
          closeLater(ErrorCode.CANCEL)
          connection.sendDegradedPingLater()
        }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 23.2K bytes
    - Viewed (1)
  6. okhttp-testing-support/src/main/kotlin/okhttp3/internal/concurrent/TaskFaker.kt

        private var editCount = 0
    
        override fun poll(): T = delegate.poll()
    
        override fun poll(
          timeout: Long,
          unit: TimeUnit,
        ): T? {
          taskRunner.lock.withLock {
            val waitUntil = nanoTime + unit.toNanos(timeout)
            while (true) {
              val result = poll()
              if (result != null) return result
              if (nanoTime >= waitUntil) return null
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 29 00:33:04 GMT 2024
    - 12.6K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

          if (degradedPongsReceived < degradedPingsSent && nowNs >= degradedPongDeadlineNs) return false
    
          return true
        }
      }
    
      /**
       * HTTP/2 can have both stream timeouts (due to a problem with a single stream) and connection
       * timeouts (due to a problem with the transport). When a stream times out we don't know whether
       * the problem impacts just one stream or the entire connection.
       *
    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)
  8. okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt

    import okio.buffer
    import org.junit.jupiter.api.AfterEach
    import org.junit.jupiter.api.Assertions.assertArrayEquals
    import org.junit.jupiter.api.Tag
    import org.junit.jupiter.api.Test
    import org.junit.jupiter.api.Timeout
    
    @Timeout(5)
    @Tag("Slow")
    class Http2ConnectionTest {
      private val peer = MockHttp2Peer()
      private val taskFaker = TaskFaker()
    
      @AfterEach fun tearDown() {
        peer.close()
        taskFaker.close()
      }
    
    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)
  9. CHANGELOG.md

        data.
    
     *  Fix: Don't fail the call when the response code is ‘HTTP 102 Processing’ or ‘HTTP 103 Early
        Hints’.
    
     *  Fix: Honor interceptors' changes to connect and read timeouts.
    
     *  Fix: Recover gracefully when a cached response is corrupted on disk.
    
     *  Fix: Don't leak file handles when a cache disk write fails.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 18 01:31:39 GMT 2024
    - 21.4K bytes
    - Viewed (0)
Back to top