File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 453
453
result)))
454
454
455
455
(defn cancel-request!
456
- " Accepts a response deferred as returned by `request` and cancels the underlying request if it is
457
- still in flight.
456
+ " Accepts a response deferred as returned by `request` and closes the underlying TCP connection. If
457
+ the request had already completed by the time this function is invoked, it has no effect (as per
458
+ Manifold deferred semantics). If cancellation succeeded, the deferred will be put into error state
459
+ with an `aleph.utils.RequestCancellationException` instance.
458
460
459
- This is done by putting the deferred into error state with an
460
- `aleph.utils.RequestCancellationException` instance as its value ."
461
+ Note that the request may already have been (partially) processed by the server at the point of
462
+ cancellation ."
461
463
[r]
462
464
(d/error! r (RequestCancellationException. " Request cancelled" )))
463
465
You can’t perform that action at this time.
0 commit comments