Skip to content

Unable to properly cancel request (Browser) #500

Description

@bileslav

Hello. The following code, contrary to expectations, doesn't return after 0.02 seconds. Or rather, not every run. Otherwise, it waits for something up to 10 seconds. The problem doesn't occur if you change React\Http\Browser::get() to React\Promise\Timer\sleep().

$browser = new React\Http\Browser();
$response = $browser->get('https://www.google.com/');

React\Promise\Timer\timeout($response, 0.02)
	->then('var_dump', 'var_dump');

React\EventLoop\Loop::run();

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions