Skip to content

Commit b99502b

Browse files
committed
fix client pubsub and uncomment tests
1 parent 0b3d5fa commit b99502b

File tree

3 files changed

+197
-198
lines changed

3 files changed

+197
-198
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,7 @@ export default class RedisCommandsQueue {
211211
signal.addEventListener('abort', value.abort.listener, { once: true });
212212
}
213213

214-
node = options?.asap ?
215-
this._toWrite.unshift(value) :
216-
this._toWrite.push(value);
214+
node = this._toWrite.add(value, options?.asap);
217215
});
218216
}
219217

@@ -272,7 +270,7 @@ export default class RedisCommandsQueue {
272270
if (command === undefined) return;
273271

274272
return new Promise<void>((resolve, reject) => {
275-
(asap ? this._toWrite.unshift : this._toWrite.push)({
273+
this._toWrite.add({
276274
args: command.args,
277275
chainId: undefined,
278276
abort: undefined,
@@ -287,7 +285,7 @@ export default class RedisCommandsQueue {
287285
},
288286
channelsCounter: command.channelsCounter,
289287
typeMapping: PUSH_TYPE_MAPPING
290-
});
288+
}, asap);
291289
});
292290
}
293291

0 commit comments

Comments
 (0)