Skip to content

Commit 4e80dc6

Browse files
committed
fix: default maint setting should be based on resp version
1 parent c6ce47c commit 4e80dc6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/client/lib/client/index.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -578,14 +578,15 @@ export default class RedisClient<
578578
this._commandOptions = options.commandOptions;
579579
}
580580

581-
if (options) {
582-
583-
if (!options.maintPushNotifications) options.maintPushNotifications = 'auto';
581+
if (options && options.maintPushNotifications === undefined) {
582+
options.maintPushNotifications =
583+
options?.RESP === 3 ? "auto" : "disabled";
584+
}
584585

586+
if (options) {
585587
return RedisClient.parseOptions(options);
586588
}
587589

588-
589590
return options;
590591
}
591592

0 commit comments

Comments
 (0)