We should register a Promise cancellation handler so that the following code actually cleans up the underlying socket resource: ``` php $promise = $connector->create('reactphp.org', 80); $promise->cancel(); ``` This can eventually also be used as the basis for timeout support (#28), similar to this: ``` php $promise = $connector->create('reactphp.org', 80); $loop->addTimer(3.0, function () use ($promise) { $promise->cancel(); }); ```
Activity
clue commentedon Sep 3, 2015
This also likely depends on reactphp/dns#28 so that the DNS request can also be canceled.
clue commentedon Aug 1, 2016
Available as of v0.4.3.
I'm now looking into this...
arnaud-lb commentedon Oct 4, 2016
Any help needed on this ? :) I need this to properly timeout requests in the http-client
clue commentedon Nov 15, 2016
Will be resolved via #71 🎉