Don't hang if socket fails to open

feof($f) returns false if $f is invalid, so if the
socket failed to open we spun forever, causing the tests to
eventually timeout. The test will still fail, but at least
we get meaningful results for the rest.
Esse commit está contido em:
mwilliams
2013-07-04 18:15:05 -07:00
commit de Sara Golemon
commit fa0d20a58a
+1 -1
Ver Arquivo
@@ -52,7 +52,7 @@ fwrite($f,
"Connection: Close\r\n".
"\r\n");
$response = '';
while (!feof($f)) {
while ($f && !feof($f)) {
$line = fgets($f, 128);
$response .= $line;
}