Closed
Description
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();