Skip to content

Commit

Permalink
return on send err
Browse files Browse the repository at this point in the history
  • Loading branch information
Trojan295 committed Sep 27, 2024
1 parent 0cff2f4 commit bf24e48
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/proxy/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit bf24e48

Please sign in to comment.