From 0f424e3cdfddd21efc20df37828861249e6da233 Mon Sep 17 00:00:00 2001 From: Derek Menteer Date: Wed, 12 Oct 2022 13:38:09 -0500 Subject: [PATCH] Reset wait on ensureServerAddrSubscription --- .../grpc-external/services/peerstream/subscription_manager.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/agent/grpc-external/services/peerstream/subscription_manager.go b/agent/grpc-external/services/peerstream/subscription_manager.go index 0f2e4bf79c..ef31f850bf 100644 --- a/agent/grpc-external/services/peerstream/subscription_manager.go +++ b/agent/grpc-external/services/peerstream/subscription_manager.go @@ -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) {