Skip to content

Commit

Permalink
修复cpu占用100%的情况
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavle Lee committed May 6, 2017
1 parent bfcf586 commit e47266e
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 e47266e

Please sign in to comment.