ignore disconnect exceptions
authorMichael Wallner <mike@php.net>
Mon, 16 Feb 2015 17:00:55 +0000 (18:00 +0100)
committerMichael Wallner <mike@php.net>
Mon, 16 Feb 2015 17:00:55 +0000 (18:00 +0100)
tests/client026.phpt
tests/helper/server.inc

index d946a2c..1e73db2 100644 (file)
@@ -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===
index ed8516b..0605adc 100644 (file)
@@ -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;
                                        }
                                }