We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 247f86d commit af60bb0Copy full SHA for af60bb0
lib/Pipeline.ts
@@ -263,9 +263,15 @@ Pipeline.prototype.exec = function (callback: Callback): Promise<Array<any>> {
263
// Wait for the cluster to be connected, since we need nodes information before continuing
264
if (this.isCluster && !this.redis.slots.length) {
265
if (this.redis.status === "wait") this.redis.connect().catch(noop);
266
+
267
+ if (callback && !this.nodeifiedPromise) {
268
+ this.nodeifiedPromise = true;
269
+ asCallback(this.promise, callback);
270
+ }
271
272
this.redis.delayUntilReady((err) => {
273
if (err) {
- callback(err);
274
+ this.reject(err);
275
return;
276
}
277
0 commit comments