From: Michael Wallner Date: Mon, 16 Feb 2015 17:00:55 +0000 (+0100) Subject: ignore disconnect exceptions X-Git-Tag: RELEASE_2_3_0_RC1~18 X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=commitdiff_plain;h=0ba32eeed8cf2e610619993b52fbf0dfba61a62d;ds=sidebyside ignore disconnect exceptions --- diff --git a/tests/client026.phpt b/tests/client026.phpt index d946a2c..1e73db2 100644 --- a/tests/client026.phpt +++ b/tests/client026.phpt @@ -41,10 +41,4 @@ array(5) { ["Content-Length"]=> int(134217973) } -exception 'http\Exception\BadMessageException' with message 'Empty message received from stream' in %sproxy.inc:%d -Stack trace: -#0 %sproxy.inc(%d): http\Message->__construct(Resource id #%d, false) -#1 %sserver.inc(%d): {closure}(Resource id #%d) -#2 %sproxy.inc(%d): serve(Object(Closure)) -#3 {main} ===DONE=== diff --git a/tests/helper/server.inc b/tests/helper/server.inc index ed8516b..0605adc 100644 --- a/tests/helper/server.inc +++ b/tests/helper/server.inc @@ -16,7 +16,10 @@ function serve(callable $cb) { $cb($client); } } catch (Exception $ex) { - fprintf(STDERR, "%s\n", $ex); + /* ignore disconnect */ + if ($ex->getMessage() !== "Empty message received from stream") { + fprintf(STDERR, "%s\n", $ex); + } break; } }