Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for REFUSED_STREAM (0.14 sec)

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

      val ipv6 = InetAddress.getByName("2001:db8:ffff:ffff:ffff:ffff:ffff:1")
    
      val refusedStream =
        MockResponse
          .Builder()
          .onRequestStart(CloseStream(ErrorCode.REFUSED_STREAM.httpCode))
          .build()
      val bodyResponse = MockResponse(body = "body")
    
      @BeforeEach
      fun setUp() {
        socketFactory = SpecificHostSocketFactory(InetSocketAddress(server1.hostName, server1.port))
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 11.7K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/HttpOverHttp2Test.kt

            .onRequestStart(CloseStream(ErrorCode.REFUSED_STREAM.httpCode))
            .build(),
        )
        server.enqueue(
          MockResponse
            .Builder()
            .onRequestStart(CloseStream(ErrorCode.REFUSED_STREAM.httpCode))
            .build(),
        )
        server.enqueue(
          MockResponse
            .Builder()
            .onRequestStart(CloseStream(ErrorCode.REFUSED_STREAM.httpCode))
            .build(),
        )
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 73.4K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/FastFallbackTest.kt

       * already had a healthy connection. It sets up a deferred connection by stalling the IPv6
       * connect, and it sets up a same-connection retry with [ErrorCode.REFUSED_STREAM].
       *
       * https://github.com/square/okhttp/pull/7190
       */
      @Test
      fun preferCallConnectionOverDeferredConnection() {
        // Make sure we have enough connection options to permit retries.
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 10.4K bytes
    - Viewed (0)
  4. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Http2Connection.kt

    import okhttp3.internal.concurrent.notifyAll
    import okhttp3.internal.concurrent.wait
    import okhttp3.internal.concurrent.withLock
    import okhttp3.internal.connection.BufferedSocket
    import okhttp3.internal.http2.ErrorCode.REFUSED_STREAM
    import okhttp3.internal.http2.Settings.Companion.DEFAULT_INITIAL_WINDOW_SIZE
    import okhttp3.internal.http2.flowcontrol.WindowCounter
    import okhttp3.internal.ignoreIoExceptions
    import okhttp3.internal.okHttpName
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 31.8K bytes
    - Viewed (0)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealConnection.kt

        e: IOException?,
      ) {
        var noNewExchangesEvent = false
        withLock {
          if (e is StreamResetException) {
            when {
              e.errorCode == ErrorCode.REFUSED_STREAM -> {
                // Stop using this connection on the 2nd REFUSED_STREAM error.
                refusedStreamCount++
                if (refusedStreamCount > 1) {
                  noNewExchangesEvent = !noNewExchanges
                  noNewExchanges = true
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 14.9K bytes
    - Viewed (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/Http2ConnectionTest.kt

        sink1.writeUtf8("abc")
        assertFailsWith<IOException> {
          sink2.writeUtf8("abc")
          sink2.flush()
        }.also { expected ->
          assertThat(expected.message).isEqualTo("stream was reset: REFUSED_STREAM")
        }
        sink1.writeUtf8("def")
        sink1.close()
        assertFailsWith<ConnectionShutdownException> {
          connection.newStream(headerEntries("c", "cola"), true)
        }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 75.5K bytes
    - Viewed (0)
Back to top