Opened 4 years ago

Closed 4 years ago

#4329 enhancement closed fixed (fixed)

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

Reported by: exarkun Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch: branches/clientcreator-cancellation-4329
(diff, github, buildbot, log)
Author: exarkun Launchpad Bug:

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 4 years ago by exarkun

  • Author set to exarkun
  • Branch set to branches/clientcreator-cancellation-4329

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

comment:2 Changed 4 years ago by exarkun

  • Keywords review added
  • Owner exarkun deleted

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

comment:3 Changed 4 years ago by therve

  • Keywords review removed
  • Owner set to exarkun
  • 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 4 years ago by therve

Oh, and the branch misses a NEWS fragment.

comment:5 Changed 4 years ago by exarkun

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

refs #4329

comment:6 Changed 4 years ago by exarkun

(In [28624]) Correct docstring

refs #4329

comment:7 Changed 4 years ago by exarkun

  • Resolution set to fixed
  • Status changed from new to closed

(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 4 years ago by <automation>

  • Owner exarkun deleted
Note: See TracTickets for help on using tickets.