Handle ECONNRESET error in SimpleServer

The ECONNRESET error is allowed to happen. We should handle it
gracefully to not report travis builds as broken.
This commit is contained in:
Andrey Lushnikov 2017-07-10 14:13:44 -07:00
parent da0cde1b45
commit f23f72524e

View File

@ -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))