diff --git a/proxy.js b/proxy.js index 6c9cdff..0dac166 100644 --- a/proxy.js +++ b/proxy.js @@ -33,6 +33,14 @@ var Proxy = function(opt, cb) { }); }); + client_server.on('error', function(err) { + if (err.code == 'ECONNRESET' || err.code == 'ETIMEDOUT') { + return; + } + + log.error(err); + }); + // track initial user connection setup var conn_timeout; @@ -118,10 +126,6 @@ var Proxy = function(opt, cb) { self.next_socket(wait_cb); } }); - - client_server.on('error', function(err) { - log.error(err); - }); }; Proxy.prototype.__proto__ = EventEmitter.prototype;