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 d946a2cbdcca42c432f6232dbad775a1a6fb6ffc..1e73db24a9488d7e2c9f7f04f093cbfdcf2540f0 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 ed8516b3a6a6b07d0809a6328d30a504b0dda63e..0605adc145a9871f0051ea6d4d926b5886e32fa7 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;
                                        }
                                }