Skip to content

Commit

Permalink
No longer need process.nextTick
Browse files Browse the repository at this point in the history
  • Loading branch information
markyen committed Feb 12, 2015
1 parent 7279519 commit fac750f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ RingPop.prototype.handleOrProxyAll =
var localHandler = opts.localHandler;

var whoami = this.whoami();
var keysByDest = _.groupBy(keys, this.lookup.bind(this));
var keysByDest = _.groupBy(keys, this.lookup, this);
var dests = Object.keys(keysByDest);
var pending = dests.length;
var responses = {};
Expand All @@ -866,19 +866,19 @@ RingPop.prototype.handleOrProxyAll =
url: req && req.url,
dest: dest
});
process.nextTick(localHandler.bind(null, req, res));
localHandler(req, res);
} else {
self.logger.trace('handleOrProxyAll was proxied', {
keys: keys,
url: req && req.url,
dest: dest
});
process.nextTick(self.proxyReq.bind(self, {
self.proxyReq({
keys: keys,
req: req,
res: res,
dest: dest
}));
});
}
});

Expand Down

0 comments on commit fac750f

Please sign in to comment.