projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
fix ::toStream() in ZTS
[m6w6/ext-http]
/
tests
/
helper
/
server.inc
diff --git
a/tests/helper/server.inc
b/tests/helper/server.inc
index 26f0c5041c0faff35b2aa512f360f97b673ba902..ed8516b3a6a6b07d0809a6328d30a504b0dda63e 100644
(file)
--- a/
tests/helper/server.inc
+++ b/
tests/helper/server.inc
@@
-11,8
+11,13
@@
function serve(callable $cb) {
if (getenv("PHP_HTTP_TEST_SSL")) {
stream_socket_enable_crypto($client, true, STREAM_CRYPTO_METHOD_SSLv23_SERVER);
}
if (getenv("PHP_HTTP_TEST_SSL")) {
stream_socket_enable_crypto($client, true, STREAM_CRYPTO_METHOD_SSLv23_SERVER);
}
- while (!feof($client)) {
- $cb($client);
+ try {
+ while (!feof($client)) {
+ $cb($client);
+ }
+ } catch (Exception $ex) {
+ fprintf(STDERR, "%s\n", $ex);
+ break;
}
}
} while ($select !== false);
}
}
} while ($select !== false);