Skip to content

Commit

Permalink
fix: make agent reconnect when it fails to get messages from stream (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mathnogueira committed Dec 20, 2023
1 parent 1ae8bd5 commit 427e09d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions agent/client/client.go
Expand Up @@ -209,6 +209,10 @@ func isConnectionError(err error) bool {
"connection refused",
"server closed",
"token is expired",

// From time to time, the server can start sending those errors to the
// agent. This mitigates the risk of an agent getting stuck in an error state
"unexpected HTTP status code received from server: 500",
}
for _, possibleErr := range possibleErrors {
if strings.Contains(err.Error(), possibleErr) {
Expand Down

0 comments on commit 427e09d

Please sign in to comment.