Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 365 for cancels (0.07 sec)

  1. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

        override fun dispatch(request: RecordedRequest): MockResponse {
          // This guarantees a deterministic sequence when handling the canceled request:
          // 1. Server reads request and dequeues first response
          // 2. Client cancels request
          // 3. Server tries to send response on the canceled stream
          // Otherwise, there is no guarantee for the sequence. For example, the server may use the
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Apr 11 22:09:35 UTC 2024
    - 75.3K bytes
    - Viewed (0)
  2. docs/changelogs/changelog_3x.md

        canceling calls would cause the shared HTTP/2 connection to be unnecessarily released. This
        harmed connection reuse.
     *  Fix: Ensure canceled and discarded HTTP/2 data is not permanently counted against the limited
        flow control window. We had a few bugs where window size accounting was broken when streams
        were canceled or reset.
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Feb 06 14:55:54 UTC 2022
    - 50.8K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/CallTest.kt

            override fun dispatch(request: RecordedRequest): MockResponse {
              call.cancel()
              return MockResponse(body = "A")
            }
          }
        call.enqueue(callback)
        assertThat(server.takeRequest().path).isEqualTo("/a")
        callback.await(requestA.url).assertFailure(
          "Canceled",
          "stream was reset: CANCEL",
          "Socket closed",
        )
      }
    
      @Test
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 10 19:46:48 UTC 2024
    - 142.5K bytes
    - Viewed (0)
  4. internal/dsync/drwmutex_test.go

    	drwm1 := NewDRWMutex(ds, "simplelock")
    	ctx1, cancel1 := context.WithCancel(context.Background())
    	if !drwm1.GetRLock(ctx1, cancel1, id, source, Options{Timeout: time.Second}) {
    		panic("Failed to acquire read lock")
    	}
    	// fmt.Println("1st read lock acquired, waiting...")
    
    	drwm2 := NewDRWMutex(ds, "simplelock")
    	ctx2, cancel2 := context.WithCancel(context.Background())
    	if !drwm2.GetRLock(ctx2, cancel2, id, source, Options{Timeout: time.Second}) {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Dec 24 03:49:07 UTC 2022
    - 9.7K bytes
    - Viewed (0)
  5. cmd/namespace-lock.go

    // LockContext lock context holds the lock backed context and canceler for the context.
    type LockContext struct {
    	ctx    context.Context
    	cancel context.CancelFunc
    }
    
    // Context returns lock context
    func (l LockContext) Context() context.Context {
    	return l.ctx
    }
    
    // Cancel function calls cancel() function
    func (l LockContext) Cancel() {
    	if l.cancel != nil {
    		l.cancel()
    	}
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Sep 29 22:40:36 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  6. internal/grid/muxclient.go

    		return &Stream{responses: responseCh, Requests: nil, ctx: m.ctx, cancel: m.cancelFn, muxID: m.MuxID}, nil
    	}
    
    	// Deliver responses and send unblocks back to the server.
    	go m.handleTwowayResponses(responseCh, responses)
    	go m.handleTwowayRequests(responses, requests)
    
    	return &Stream{responses: responseCh, Requests: requests, ctx: m.ctx, cancel: m.cancelFn, muxID: m.MuxID}, nil
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 15.9K bytes
    - Viewed (0)
  7. okhttp-sse/src/main/kotlin/okhttp3/sse/internal/RealEventSource.kt

          // This is a long-lived response. Cancel full-call timeouts.
          call?.timeout()?.cancel()
    
          // Replace the body with a stripped one so the callbacks can't see real data.
          val response = response.stripBody()
    
          val reader = ServerSentEventReader(body.source(), this)
          try {
            if (!canceled) {
              listener.onOpen(this, response)
              while (!canceled && reader.processNextEvent()) {
              }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

       */
      override fun cancel() {
        if (canceled) return // Already canceled.
    
        canceled = true
        exchange?.cancel()
        for (plan in plansToCancel) {
          plan.cancel()
        }
    
        eventListener.canceled(this)
      }
    
      override fun isCanceled(): Boolean = canceled
    
      override fun execute(): Response {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  9. internal/cachevalue/cache_test.go

    			return time.Now(), slowCaller(ctx)
    		},
    	)
    
    	ctx, cancel := context.WithCancel(context.Background())
    	cancel() // cancel context to test.
    
    	_, err := cache.GetWithCtx(ctx)
    	if !errors.Is(err, context.Canceled) {
    		t.Fatalf("expected context.Canceled err, got %v", err)
    	}
    
    	ctx, cancel = context.WithCancel(context.Background())
    	defer cancel()
    
    	t1, err := cache.GetWithCtx(ctx)
    	if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu May 09 00:51:34 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  10. internal/grid/stream.go

    // Results returns the results from the remote server one by one.
    // If any error is returned by the callback, the stream will be canceled.
    // If the context is canceled, the stream will be canceled.
    func (s *Stream) Results(next func(b []byte) error) (err error) {
    	done := false
    	defer func() {
    		if s.cancel != nil {
    			s.cancel(err)
    		}
    
    		if !done {
    			// Drain channel.
    			for range s.responses {
    			}
    		}
    	}()
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jun 07 15:51:52 UTC 2024
    - 3.1K bytes
    - Viewed (0)
Back to top