From bf24e486545b3a0013030cd1601ef92c8efda4ea Mon Sep 17 00:00:00 2001 From: Damian Czaja Date: Fri, 27 Sep 2024 17:08:37 +0200 Subject: [PATCH] return on send err --- internal/proxy/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/proxy/client.go b/internal/proxy/client.go index d25220d..d51a48e 100644 --- a/internal/proxy/client.go +++ b/internal/proxy/client.go @@ -182,7 +182,8 @@ func (c *Client) run(ctx context.Context) error { case req := <-sendCh: c.log.Printf("Sending message to stream") if err := stream.Send(req); err != nil { - c.log.WithError(err).Warn("failed to send keep alive") + c.log.WithError(err).Warn("failed to send message to stream") + return fmt.Errorf("failed to send message to stream: %w", err) } case <-time.After(time.Duration(c.keepAlive.Load())): if !c.isAlive() {