Opened 8 years ago

Closed 8 years ago

#4329 enhancement closed fixed (fixed)

Allow the Deferreds returned by ClientCreator's methods to be cancelled

Reported by: Jean-Paul Calderone Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch: branches/clientcreator-cancellation-4329
branch-diff, diff-cov, branch-cov, buildbot
Author: exarkun

Description

Cancelling the Deferred returned by ClientCreator's connectTCP, connectSSL, and connectUNIX methods should fail the Deferred with CancelledError and abort the connection attempt by calling stopConnecting on the IConnector provider returned by the underlying reactor method.

Change History (8)

comment:1 Changed 8 years ago by Jean-Paul Calderone

Author: exarkun
Branch: branches/clientcreator-cancellation-4329

(In [28581]) Branching to 'clientcreator-cancellation-4329'

comment:2 Changed 8 years ago by Jean-Paul Calderone

Keywords: review added
Owner: Jean-Paul Calderone deleted

Done, and with only about 40% more insanity than the RDA.

comment:3 Changed 8 years ago by therve

Keywords: review removed
Owner: set to Jean-Paul Calderone
  • It would be nice to remove some duplications in ClientCreator, maybe making the canceller a method? Although it may be hard because it relies on the local frame.
  • test_cancelConnectSSLTimeout mentions connectUNIX in its docstring.

It's going to conflict pretty badly with #1442, because of the changes in proto_helpers, so it would be nice to notify David. Other than that, it looks good, +1!

comment:4 Changed 8 years ago by therve

Oh, and the branch misses a NEWS fragment.

comment:5 Changed 8 years ago by Jean-Paul Calderone

(In [28623]) Refactor ClientCreator methods to use a common implementation

refs #4329

comment:6 Changed 8 years ago by Jean-Paul Calderone

(In [28624]) Correct docstring

refs #4329

comment:7 Changed 8 years ago by Jean-Paul Calderone

Resolution: fixed
Status: newclosed

(In [28631]) Merge clientcreator-cancellation-4329

Author: exarkun Reviewer: therve Fixes: #4329

Implement cancellation for the Deferreds returned by ClientCreator's methods.

comment:8 Changed 7 years ago by <automation>

Owner: Jean-Paul Calderone deleted
Note: See TracTickets for help on using tickets.