diff --git a/client.js b/client.js index 8f8a5bc..bb2f25b 100644 --- a/client.js +++ b/client.js @@ -59,7 +59,7 @@ var connect = function(opt) { remote.once('error', function(err) { if (err.code !== 'ECONNREFUSED') { - local.emit('error', err); + remote.emit('error', err); } // retrying connection to local server