ignore disconnect exceptions
[m6w6/ext-http] / tests / helper / server.inc
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;
                                        }
                                }