summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2011-08-21 16:59:48 +0200
committerAndreas Gohr <andi@splitbrain.org>2011-08-21 16:59:48 +0200
commit56e27257eef4a54d4fba170088589dccb39f5bb3 (patch)
tree621f56d45e5c766d9f10891d1095e9581731c8c3
parentba72dce1b47b01a626df51666b84593d8cbc1050 (diff)
downloadrpg-56e27257eef4a54d4fba170088589dccb39f5bb3.tar.gz
rpg-56e27257eef4a54d4fba170088589dccb39f5bb3.tar.bz2
avoid 100% cpu usage when reading HTTP headers FS#2304
-rw-r--r--inc/HTTPClient.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php
index 372769b71..fdf95d113 100644
--- a/inc/HTTPClient.php
+++ b/inc/HTTPClient.php
@@ -368,6 +368,7 @@ class HTTPClient {
unset($this->connections[$connectionId]);
return false;
}
+ usleep(1000);
$r_headers .= fgets($socket,1024);
}while(!preg_match('/\r?\n\r?\n$/',$r_headers));