Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit af55608

Browse files
committed
fix: use async/setImmediate vs process.nextTick
1 parent 7b4a0a8 commit af55608

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/components/pubsub.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict'
22

33
const promisify = require('promisify-es6')
4+
const setImmediate = require('async/setImmediate')
45

56
module.exports = function pubsub (self) {
67
return {
@@ -31,7 +32,7 @@ module.exports = function pubsub (self) {
3132
return Promise.resolve()
3233
}
3334

34-
process.nextTick(() => callback())
35+
setImmediate(() => callback())
3536
},
3637

3738
publish: promisify((topic, data, callback) => {

0 commit comments

Comments
 (0)