From acdeb385a99ada1ad5e115c9c1dcc0f05b12f1bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Papp?= Date: Wed, 19 Aug 2026 17:40:42 +0200 Subject: [PATCH] [client] Reset gRPC channel backoff when the network returns Dials attempted by the gRPC channel while offline grow its internal exponential backoff, so after the network came back the reconnect loop sat in WaitForStateChange until that timer expired. Reset the channel backoff alongside the retry backoff so the management and signal reconnects dial immediately. --- shared/management/client/grpc.go | 3 +++ shared/signal/client/grpc.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/shared/management/client/grpc.go b/shared/management/client/grpc.go index 7ce79b418..0bd912929 100644 --- a/shared/management/client/grpc.go +++ b/shared/management/client/grpc.go @@ -233,6 +233,9 @@ func (c *GrpcClient) withMgmtStream( return nil //nolint:nilerr // a cancelled context means shutdown, not a retryable failure } else if waited { backOff.Reset() + // dials attempted while offline grew the channel's internal backoff; + // reset it too, or the reconnect waits out that timer first + c.conn.ResetConnectBackoff() } connState := c.conn.GetState() diff --git a/shared/signal/client/grpc.go b/shared/signal/client/grpc.go index 0af4dc4da..f9bc7c737 100644 --- a/shared/signal/client/grpc.go +++ b/shared/signal/client/grpc.go @@ -197,6 +197,9 @@ func (c *GrpcClient) Receive(ctx context.Context, msgHandler func(msg *proto.Mes return nil } else if waited { backOff.Reset() + // dials attempted while offline grew the channel's internal backoff; + // reset it too, or the reconnect waits out that timer first + c.signalConn.ResetConnectBackoff() } c.notifyStreamDisconnected()