Skip to content

Commit 9419fef

Browse files
committed
exit "resubscribe" if pubsub not active
1 parent 2aab6eb commit 9419fef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/client/lib/client/commands-queue.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,11 @@ export default class RedisCommandsQueue {
162162
}
163163

164164
resubscribe(): Promise<any> | undefined {
165-
const commands = this.#pubSub.resubscribe();
166-
if (!commands) return;
165+
if (!this.#pubSub.isActive) return;
167166

168167
return Promise.all(
169-
commands.map(command => this.#pushPubSubCommand(command))
168+
this.#pubSub.resubscribe()
169+
.map(command => this.#pushPubSubCommand(command))
170170
);
171171
}
172172

0 commit comments

Comments
 (0)