verify: remove process.nextTick (#302)

running synchronous code asynchronously using process.nextTick
has a negative latency impact
This commit is contained in:
ilyapx
2017-09-06 16:41:55 +02:00
committed by Eduardo Diaz
parent 80b0f8535f
commit 2bbd6a37b4
+1 -6
View File
@@ -21,12 +21,7 @@ module.exports = function (jwtString, secretOrPublicKey, options, callback) {
var done;
if (callback) {
done = function() {
var args = Array.prototype.slice.call(arguments, 0);
return process.nextTick(function() {
callback.apply(null, args);
});
};
done = callback;
} else {
done = function(err, data) {
if (err) throw err;