Permalink
Browse files

Merge pull request #37 from ajaxorg/master

Put resume in the next tick
  • Loading branch information...
2 parents e070b86 + ff5323e commit dd668f9af0505b8d0e0487ada63a303a8a0c9f98 Sergi Mansilla committed Nov 29, 2012
Showing with 5 additions and 3 deletions.
  1. +4 −2 lib/jsftp.js
  2. +1 −1 package.json
View
@@ -640,8 +640,10 @@ Ftp.getPasvPort = function(text) {
this.removeListener("close", onClose);
this.removeListener("error", onError);
- buffer.forEach(socket.emit.bind(socket));
- resume.call(this);
+ setTimeout(function() {
+ buffer.forEach(socket.emit.bind(socket));
+ resume.call(socket);
+ }, 0);
};
return socket;
View
@@ -1,7 +1,7 @@
{
"name": "jsftp",
"id": "jsftp",
- "version": "0.5.2",
+ "version": "0.5.3",
"description": "A sane FTP client implementation for NodeJS",
"keywords": [ "ftp", "protocol", "files", "server", "client", "async" ],
"author": "Sergi Mansilla <sergi.mansilla@gmail.com> (http://sergimansilla.com)",

0 comments on commit dd668f9

Please sign in to comment.