diff options
author | Andreas Gohr <andi@splitbrain.org> | 2011-11-27 16:59:14 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2011-11-27 16:59:14 +0100 |
commit | 2fe6daea539c94704c1932f546ad01d3bfc5d04c (patch) | |
tree | e4244c9545cb26945634a5b23b8e2ea135541673 /inc/HTTPClient.php | |
parent | 2e9c51889d8855cf56cb3f21a9c4926bd94ef21f (diff) | |
download | rpg-2fe6daea539c94704c1932f546ad01d3bfc5d04c.tar.gz rpg-2fe6daea539c94704c1932f546ad01d3bfc5d04c.tar.bz2 |
suppress errors on stream_select FS#2276
On certain environments, stream_select might produce temporary errors
when file descriptors are running scarce.
Diffstat (limited to 'inc/HTTPClient.php')
-rw-r--r-- | inc/HTTPClient.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index fdf95d113..641950348 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -338,7 +338,10 @@ class HTTPClient { } // wait for stream ready or timeout (1sec) - if(stream_select($sel_r,$sel_w,$sel_e,1) === false) continue; + if(@stream_select($sel_r,$sel_w,$sel_e,1) === false){ + usleep(1000); + continue; + } // write to stream $ret = fwrite($socket, substr($request,$written,4096)); |