diff --git a/lib/proxy.js b/lib/proxy.js index ed4efbf43..f06d07a93 100644 --- a/lib/proxy.js +++ b/lib/proxy.js @@ -61,7 +61,7 @@ var createProxyHandler = function(proxy, proxyConfig) { }; } proxy.on('proxyError', function(err, req, resp) { - if (err.code === 'ECONNRESET' && resp.socket.destroyed) { + if (err.code === 'ECONNRESET' && req.socket.destroyed) { log.debug('failed to proxy %s (browser hang up the socket)', req.url); } else { log.warn('failed to proxy %s (%s)', req.url, err);