From 80045042f210b53a3a99b994e9e3b9fa3f354b75 Mon Sep 17 00:00:00 2001 From: Harald Kirschner Date: Fri, 19 Sep 2014 13:18:06 -0700 Subject: [PATCH] Fixes #3 by making parsing loop async --- src/parser.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/parser.js b/src/parser.js index fd1f934..ac6578a 100644 --- a/src/parser.js +++ b/src/parser.js @@ -105,7 +105,9 @@ exports.parseFtpEntries = function parseFtpEntries(listing, callback) { async.eachSeries(entries, function(entry, next) { function _next() { i += 1; - next(); + process.nextTick(function() { + next(); + }); } // Some servers include an official code-multiline sign at the beginning