Skip to content

Commit

Permalink
Merge pull request #40 from Liv1020/master
Browse files Browse the repository at this point in the history
修复cpu占用100%的情况
  • Loading branch information
andot authored May 7, 2017
2 parents bfcf586 + e47266e commit f1ef333
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Hprose/Http/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,11 @@ public function loop() {
--$count;
if ($msgs_in_queue === 0) break;
}

// See https://bugs.php.net/bug.php?id=61141
if (curl_multi_select($multicurl) === -1) {
usleep(100);
}
}
}
catch (Exception $e) {
Expand Down

0 comments on commit f1ef333

Please sign in to comment.