projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Merge branch 'master' into phpng
[m6w6/ext-http]
/
tests
/
helper
/
server.inc
diff --git
a/tests/helper/server.inc
b/tests/helper/server.inc
index 26f0c5041c0faff35b2aa512f360f97b673ba902..0605adc145a9871f0051ea6d4d926b5886e32fa7 100644
(file)
--- a/
tests/helper/server.inc
+++ b/
tests/helper/server.inc
@@
-11,8
+11,16
@@
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) {
+ /* ignore disconnect */
+ if ($ex->getMessage() !== "Empty message received from stream") {
+ fprintf(STDERR, "%s\n", $ex);
+ }
+ break;
}
}
} while ($select !== false);
}
}
} while ($select !== false);