Skip to content

Commit

Permalink
Expand callbacks in uploader
Browse files Browse the repository at this point in the history
Functionally no different, but if an async.js error occurs, display these in the stack trace (may make issues easier to identify)
  • Loading branch information
animetosho committed Feb 11, 2018
1 parent 8276603 commit 5e2f9bd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/uploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ Uploader.prototype = {
self._checkLoop(c, cb)();
} else {
// no checking needed on this connection, close it down
self._closeConnection('post', c.connNum, cb);
self._closeConnection('post', c.connNum, function() {
cb();
});
}
return;
}
Expand Down Expand Up @@ -285,7 +287,9 @@ Uploader.prototype = {
if(err) return cb(err);
self.checkQueue.take(function(post) {
if(!post) { // done, close down
self._closeConnection('check', c.connNum, cb);
self._closeConnection('check', c.connNum, function() {
cb();
});
// TODO: assumes that this is a checking connection and not a posting one
return;
}
Expand Down

0 comments on commit 5e2f9bd

Please sign in to comment.