]> granicus.if.org Git - php/commitdiff
fix infinite loop in the test
authorAntony Dovgal <tony2001@php.net>
Tue, 20 Apr 2010 10:04:26 +0000 (10:04 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 20 Apr 2010 10:04:26 +0000 (10:04 +0000)
ext/openssl/tests/bug48182.phpt

index 7471c4c5dfac492aa6057168123cdcb98eaee2cb..146c4c9226df962b3a03ea27c2e7d97f0fdc1541 100644 (file)
@@ -51,7 +51,7 @@ function ssl_async_client($port) {
        $socket = stream_socket_client($host, $errno, $errstr, 10, $flags);
        stream_set_blocking($socket, 0);
 
-       while ($data) {
+       while ($socket && $data) {
                $wrote = fwrite($socket, $data, strlen($data));
                $data = substr($data, $wrote);
        }