Skip to content

Commit

Permalink
Use setImmediate() in callback
Browse files Browse the repository at this point in the history
  • Loading branch information
regseb committed Oct 11, 2024
1 parent c5fa3d3 commit 5ea44f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/binding.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function maybeCallback(callback, ctx, thisArg, func) {
} catch (e) {
err = e;
}
process.nextTick(function () {
setImmediate(function () {
if (val === undefined) {
callback(err);
} else {
Expand Down

0 comments on commit 5ea44f0

Please sign in to comment.