Skip to content

Commit 76bb698

Browse files
committed
still hunting this deadlock
1 parent 30e5c82 commit 76bb698

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

redis.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -469,16 +469,16 @@ func (c *baseClient) initConn(ctx context.Context, cn *pool.Conn) error {
469469
// enabled mode, fail the connection
470470
c.optLock.RUnlock()
471471
return fmt.Errorf("failed to enable maintenance notifications: %w", hitlessHandshakeErr)
472-
case hitless.MaintNotificationsAuto:
472+
default: // will handle auto and any other
473473
c.optLock.RUnlock()
474474
c.optLock.Lock()
475+
c.opt.HitlessUpgradeConfig.Enabled = hitless.MaintNotificationsDisabled
476+
c.optLock.Unlock()
475477
// auto mode, disable hitless upgrades and continue
476478
if err := c.disableHitlessUpgrades(); err != nil {
477479
// Log error but continue - auto mode should be resilient
478480
internal.Logger.Printf(ctx, "hitless: failed to disable hitless upgrades in auto mode: %v", err)
479481
}
480-
c.opt.HitlessUpgradeConfig.Enabled = hitless.MaintNotificationsDisabled
481-
c.optLock.Unlock()
482482
}
483483
} else {
484484
// handshake was executed successfully

0 commit comments

Comments
 (0)