Skip to content

Commit

Permalink
Set must reconnect = false only in error case
Browse files Browse the repository at this point in the history
  • Loading branch information
d1slike committed Feb 13, 2024
1 parent af69986 commit 2b57b07
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ func (s *Client) Run(ctx context.Context) error {
case <-ctx.Done():
return ctx.Err()
case err := <-s.firstOccurredError:
s.mustReconnect.Store(false)
if err != nil {
s.mustReconnect.Store(false)
}
return err
}
}
Expand Down

0 comments on commit 2b57b07

Please sign in to comment.