Closed
Description
We should register a Promise cancellation handler so that the following code actually cleans up the underlying socket resource:
$promise = $connector->create('reactphp.org', 80);
$promise->cancel();
This can eventually also be used as the basis for timeout support (#28), similar to this:
$promise = $connector->create('reactphp.org', 80);
$loop->addTimer(3.0, function () use ($promise) {
$promise->cancel();
});