Ticket #4329 enhancement closed fixed

Opened 3 years ago

Last modified 3 years ago

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
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

1

Changed 3 years ago by exarkun

  • branch set to branches/clientcreator-cancellation-4329
  • branch_author set to exarkun

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

2

Changed 3 years ago by exarkun

  • keywords review added
  • owner exarkun deleted

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

3

Changed 3 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!

4

Changed 3 years ago by therve

Oh, and the branch misses a NEWS fragment.

5

Changed 3 years ago by exarkun

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

refs #4329

6

Changed 3 years ago by exarkun

(In [28624]) Correct docstring

refs #4329

7

Changed 3 years ago by exarkun

  • status changed from new to closed
  • resolution set to fixed

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

Author: exarkun Reviewer: therve Fixes: #4329

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

8

Changed 2 years ago by <automation>

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