diff --git a/test/SimpleServer.js b/test/SimpleServer.js index 8b75081d..048ec9a1 100644 --- a/test/SimpleServer.js +++ b/test/SimpleServer.js @@ -120,6 +120,12 @@ class SimpleServer { } _onRequest(request, response) { + request.on('error', error => { + if (error.code === 'ECONNRESET') + response.end(); + else + throw error; + }); let pathName = url.parse(request.url).path; // Notify request subscriber. if (this._requestSubscribers.has(pathName))