1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-24 18:13:00 +01:00

Do not call tick() when sending a request

This commit is contained in:
Michael Dowling 2015-04-16 00:57:41 -07:00
parent d2f7bea38d
commit 20d9df1df9

View File

@ -159,12 +159,11 @@ class CurlMultiHandler
// pool only after the specified delay.
if (empty($entry['options']['delay'])) {
curl_multi_add_handle($this->_mh, $handle);
$this->tick();
// Do the connection, but don't process any messages as that can
// lead to recursion.
while (curl_multi_exec($this->_mh, $this->active) === CURLM_CALL_MULTI_PERFORM);
} elseif ($entry['options']['delay'] === true) {
$mh = $this->_mh;
P\trampoline()->schedule(static function () use ($handle, $mh) {
curl_multi_add_handle($mh, $handle);
});
curl_multi_add_handle($this->_mh, $handle);
} else {
$this->delays[$id] = microtime(true) + ($entry['options']['delay'] / 1000);
}