Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for isCancelled (0.15 sec)

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

        canceled = true
        exchange?.cancel()
        for (plan in plansToCancel) {
          plan.cancel()
        }
    
        eventListener.canceled(this)
      }
    
      override fun isCanceled(): Boolean = canceled
    
      override fun execute(): Response {
        check(executed.compareAndSet(false, true)) { "Already Executed" }
    
        timeout.enter()
        callStart()
        try {
    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

                  noNewExchangesEvent = !noNewExchanges
                  noNewExchanges = true
                  routeFailureCount++
                }
              }
    
              e.errorCode == ErrorCode.CANCEL && call.isCanceled() -> {
                // Permit any number of CANCEL errors on locally-canceled calls.
              }
    
              else -> {
                // Everything else wants a fresh connection.
    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. okhttp-testing-support/src/main/kotlin/okhttp3/FailingCall.kt

      override fun enqueue(responseCallback: Callback): Unit = error("unexpected")
    
      override fun cancel(): Unit = error("unexpected")
    
      override fun isExecuted(): Boolean = error("unexpected")
    
      override fun isCanceled(): Boolean = error("unexpected")
    
      override fun timeout(): Timeout = error("unexpected")
    
      override fun clone(): Call = error("unexpected")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/connection/FastFallbackExchangeFinder.kt

      override fun find(): RealConnection {
        var firstException: IOException? = null
        try {
          while (tcpConnectsInFlight.isNotEmpty() || routePlanner.hasNext()) {
            if (routePlanner.isCanceled()) throw IOException("Canceled")
    
            // Launch a new connection if we're ready to.
            val now = taskRunner.backend.nanoTime()
            var awaitTimeoutNanos = nextTcpConnectAtNanos - now
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/WholeOperationTimeoutTest.kt

        call.timeout().timeout(250, TimeUnit.MILLISECONDS)
        assertFailsWith<IOException> {
          call.execute()
        }.also { expected ->
          assertThat(expected.message).isEqualTo("timeout")
          assertThat(call.isCanceled()).isTrue()
        }
      }
    
      @Test
      fun timeoutWritingRequestWithEnqueue() {
        server.enqueue(MockResponse())
        val request =
          Request.Builder()
            .url(server.url("/"))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/connection/CallConnectionUser.kt

        connection.connectionListener.noNewExchanges(connection)
      }
    
      override fun doExtensiveHealthChecks(): Boolean {
        return chain.request.method != "GET"
      }
    
      override fun isCanceled(): Boolean {
        return call.isCanceled()
      }
    
      override fun candidateConnection(): RealConnection? {
        return call.connection
      }
    
      override fun proxySelectStart(url: HttpUrl) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/DispatcherTest.kt

        assertThat(a1.isExecuted()).isTrue()
        assertThat(a1.isCanceled()).isFalse()
        assertThat(a2.isExecuted()).isTrue()
        assertThat(a2.isCanceled()).isTrue()
        assertThat(a3.isExecuted()).isFalse()
        assertThat(a3.isCanceled()).isTrue()
        assertThat(a4.isExecuted()).isFalse()
        assertThat(a4.isCanceled()).isFalse()
      }
    
      @Test
      fun idleCallbackInvokedWhenIdle() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/Call.kt

      fun cancel()
    
      /**
       * Returns true if this call has been either [executed][execute] or [enqueued][enqueue]. It is an
       * error to execute a call more than once.
       */
      fun isExecuted(): Boolean
    
      fun isCanceled(): Boolean
    
      /**
       * Returns a timeout that spans the entire call: resolving DNS, connecting, writing the request
       * body, server processing, and reading the response body. If the call requires redirects or
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 3.6K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/InterceptorTest.kt

        val interceptor =
          Interceptor { chain: Interceptor.Chain ->
            val call = chain.call()
            callRef.set(call)
            assertThat(call.isCanceled()).isFalse()
            call.cancel()
            assertThat(call.isCanceled()).isTrue()
            chain.proceed(chain.request())
          }
        client =
          client.newBuilder()
            .addInterceptor(interceptor)
            .build()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 27.8K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

                  }
                },
            ),
          )
        callReference.set(call)
        assertFailsWith<IOException> {
          call.execute()
        }.also { expected ->
          assertThat(call.isCanceled()).isTrue()
        }
        val recordedRequest = server.takeRequest()
        assertThat(recordedRequest.failure!!).hasMessage("stream was reset: CANCEL")
      }
    
      @ParameterizedTest
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
Back to top