Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Put resume in the next tick

  • Loading branch information...
commit 6a5dc3389b7a8c0dc5b4fd88deb41e1bf5021e73 1 parent 5f6055e
Sergi Mansilla authored
Showing with 5 additions and 3 deletions.
  1. +4 −2 lib/jsftp.js
  2. +1 −1  package.json
6 lib/jsftp.js
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;
2  package.json
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)",
Please sign in to comment.
Something went wrong with that request. Please try again.