From ed5216d1826471f707aa710f902f43739927f3e6 Mon Sep 17 00:00:00 2001 From: gnought <1684105+gnought@users.noreply.github.com> Date: Sun, 11 Aug 2019 01:44:42 +0800 Subject: [PATCH] Set grant later as we are using waterfall pattern --- lib/handlers/subscribe.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/handlers/subscribe.js b/lib/handlers/subscribe.js index 5548a239..902a49ff 100644 --- a/lib/handlers/subscribe.js +++ b/lib/handlers/subscribe.js @@ -91,9 +91,9 @@ function blockDollarSignTopics (func) { function storeSubscriptions (sub, done) { if (!sub) { - this.granted = 128 - return done() + return done(null, null) } + var packet = this.packet if (packet.restore) {