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

Fix sleep calculation when waiting for delayed requests

`$nextTime` is always set in the future, and `usleep()` takes microseconds as an argument. Currently this function always returns 0 if there are no ongoing requests, clogging the CPU in the `while` loop.
This commit is contained in:
Milos Colakovic
2015-12-01 02:55:03 +01:00
parent 14c8c76919
commit 3de0df38c7

View File

@ -192,6 +192,6 @@ class CurlMultiHandler
} }
} }
return max(0, $currentTime - $nextTime); return max(0, $nextTime - $currentTime) * 1000000;
} }
} }