Skip to content

Commit 298697a

Browse files
authored
Update commands-queue.ts
1 parent 9419fef commit 298697a

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-
if (!this.#pubSub.isActive) return;
165+
const commands = this.#pubSub.resubscribe();
166+
if (!commands.length) return;
166167

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

0 commit comments

Comments
 (0)