From fae50520ff82939afafbdb49f7d462a60483223e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Papp?= Date: Tue, 31 Mar 2026 14:56:01 +0200 Subject: [PATCH] [client] remove WaitForReady from stream open call MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit grpc.WaitForReady(true) parks the RPC call internally until the connection reaches READY, only unblocking on ctx cancellation. This means the external backoff.Retry loop in Receive() never gets control back during a connection outage — it cannot tick, log, or apply its retry intervals while WaitForReady is blocking. Removing it restores fail-fast behaviour: Events() returns immediately with codes.Unavailable when the connection is not ready, which is exactly what the backoff loop expects. The backoff becomes the single authority over retry timing and cadence, as originally intended. --- flow/client/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flow/client/client.go b/flow/client/client.go index 64aecb3fb..239b10a20 100644 --- a/flow/client/client.go +++ b/flow/client/client.go @@ -127,7 +127,7 @@ func (c *GRPCClient) Receive(ctx context.Context, interval time.Duration, msgHan } func (c *GRPCClient) establishStreamAndReceive(ctx context.Context, msgHandler func(msg *proto.FlowEventAck) error) error { - stream, err := c.realClient.Events(ctx, grpc.WaitForReady(true)) + stream, err := c.realClient.Events(ctx) if err != nil { return fmt.Errorf("create event stream: %w", err) }