Closed cyli closed 10 years ago
Good catch, and the fix looks good. I wonder if it would be better to just get rid of the async.waterfall completely. Since there is only one actual asynchronous function call now, it seems like just extra complication at this point.
Sure, that makes sense, thanks.
@wadey Going to merge, tag, and npm publish if this looks ok to you! Thank you again for your contribution and review!
Looks good to me. :+1: Thanks for node-tryfer and your continued support.
Added a test to verify https://github.com/racker/node-tryfer/pull/16 and make sure no regressions happen. Discovered an additional bug that may cause problems, namely that
scribe.Scribe.send
is not an asynchronous function - it does not take a callback.async.waterfall requires that each function accept a callback, and cannot move on to the next task (or finish) if not callbacked.
So wrapped the call to
scribe.Scribe.send
in a function that takes a callback, and calls it immediately after send. From looking at the scribe code it doesn't seem like it can error? And it should return immediately.