File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -432,7 +432,7 @@ func (c *baseClient) initConn(ctx context.Context, cn *pool.Conn) error {
432432
433433 // Enable maintenance notifications if hitless upgrades are configured
434434 c .optLock .RLock ()
435- hitlessEnabled := c .opt .HitlessUpgradeConfig . IsEnabled ()
435+ hitlessEnabled := c .opt .HitlessUpgradeConfig != nil && c . opt . HitlessUpgradeConfig . Enabled != hitless . MaintNotificationsDisabled
436436 protocol := c .opt .Protocol
437437 endpointType := c .opt .HitlessUpgradeConfig .EndpointType
438438 c .optLock .RUnlock ()
@@ -923,7 +923,7 @@ func NewClient(opt *Options) *Client {
923923 c .pubSubPool = newPubSubPool (opt , c .dialHook )
924924
925925 // Initialize hitless upgrades first if enabled and protocol is RESP3
926- if opt .HitlessUpgradeConfig . IsEnabled () && opt .Protocol == 3 {
926+ if opt .HitlessUpgradeConfig != nil && opt . HitlessUpgradeConfig . Enabled != hitless . MaintNotificationsDisabled && opt .Protocol == 3 {
927927 err := c .enableHitlessUpgrades ()
928928 if err != nil {
929929 internal .Logger .Printf (context .Background (), "hitless: failed to initialize hitless upgrades: %v" , err )
You can’t perform that action at this time.
0 commit comments