Reset wait on ensureServerAddrSubscription

pull/14987/head
Derek Menteer 2022-10-12 13:38:09 -05:00 committed by Derek Menteer
parent b0b0cbb8ee
commit 0f424e3cdf
1 changed files with 3 additions and 1 deletions

View File

@ -836,7 +836,9 @@ func (m *subscriptionManager) ensureServerAddrSubscription(ctx context.Context,
var err error
idx, err = m.subscribeServerAddrs(ctx, idx, updateCh)
if errors.Is(err, stream.ErrSubForceClosed) {
if err == nil {
waiter.Reset()
} else if errors.Is(err, stream.ErrSubForceClosed) {
logger.Trace("subscription force-closed due to an ACL change or snapshot restore, will attempt resume")
} else if !errors.Is(err, context.Canceled) && !errors.Is(err, context.DeadlineExceeded) {