From 0ba32eeed8cf2e610619993b52fbf0dfba61a62d Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 16 Feb 2015 18:00:55 +0100 Subject: [PATCH] ignore disconnect exceptions --- tests/client026.phpt | 6 ------ tests/helper/server.inc | 5 ++++- 2 files changed, 4 insertions(+), 7 deletions(-) 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; } } -- 2.30.2