[client] Don't permanently fail on flow grpc shutdown (#3557)

This commit is contained in:
Viktor Liu 2025-03-22 11:56:00 +01:00 committed by GitHub
parent 9325fb7990
commit 2bbe0f3f09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -95,7 +95,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 { func (c *GRPCClient) establishStreamAndReceive(ctx context.Context, msgHandler func(msg *proto.FlowEventAck) error) error {
if c.clientConn.GetState() == connectivity.Shutdown { if c.clientConn.GetState() == connectivity.Shutdown {
return backoff.Permanent(errors.New("connection to flow receiver has been shut down")) return errors.New("connection to flow receiver has been shut down")
} }
stream, err := c.realClient.Events(ctx, grpc.WaitForReady(true)) stream, err := c.realClient.Events(ctx, grpc.WaitForReady(true))