Skip to content

Support Promise cancellation #40

Closed

Description

@clue

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();
});

Activity

  1. clue commented on Sep 3, 2015

    @clue
    ContributorAuthor

    This also likely depends on reactphp/dns#28 so that the DNS request can also be canceled.

  2. added this to the v0.5.1 milestone on Aug 1, 2016
  3. self-assigned this
    on Aug 1, 2016
  4. clue commented on Aug 1, 2016

    @clue
    ContributorAuthor

    This also likely depends on reactphp/dns#28 so that the DNS request can also be canceled.

    Available as of v0.4.3.

    I'm now looking into this...

  5. arnaud-lb commented on Oct 4, 2016

    @arnaud-lb

    Any help needed on this ? :) I need this to properly timeout requests in the http-client

  6. clue commented on Nov 15, 2016

    @clue
    ContributorAuthor

    Will be resolved via #71 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions