Browse files

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

  • Loading branch information...
1 parent f9d3567 commit fd50ede0038b4630d1f4b2df26cd672a2a0e90d1 @mscdex committed Oct 9, 2013
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);

0 comments on commit fd50ede

Please sign in to comment.