Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

connection: use 'on' instead of 'once' for error event

  • Loading branch information...
commit fd50ede0038b4630d1f4b2df26cd672a2a0e90d1 1 parent f9d3567
@mscdex authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/connection.js
View
4 lib/connection.js
@@ -261,7 +261,7 @@ FTP.prototype.connect = function(options) {
socket.setEncoding('binary');
socket.on('data', ondata);
socket.once('end', onend);
- socket.once('error', onerror);
+ socket.on('error', onerror);
}
}
}
@@ -273,7 +273,7 @@ FTP.prototype.connect = function(options) {
self._parser.write(chunk);
}
- socket.once('error', onerror);
+ socket.on('error', onerror);
function onerror(err) {
clearTimeout(timer);
clearTimeout(self._keepalive);
Please sign in to comment.
Something went wrong with that request. Please try again.