From fa0d20a58a7469eead12cd9ee20353192836f0dd Mon Sep 17 00:00:00 2001 From: mwilliams Date: Thu, 4 Jul 2013 18:15:05 -0700 Subject: [PATCH] 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. --- hphp/test/slow/ext_network/ext_network.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hphp/test/slow/ext_network/ext_network.php b/hphp/test/slow/ext_network/ext_network.php index 360f20691..9b9e0fc23 100644 --- a/hphp/test/slow/ext_network/ext_network.php +++ b/hphp/test/slow/ext_network/ext_network.php @@ -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; }