Skip to content

Commit

Permalink
Fix health check (#2412)
Browse files Browse the repository at this point in the history
Fix #2370
  • Loading branch information
qwerty287 authored Sep 9, 2023
1 parent 6d59bd1 commit a06a626
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/server/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ func pinger(c *cli.Context) error {
return err
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
return fmt.Errorf("server returned non-200 status code")
if resp.StatusCode < 200 && resp.StatusCode >= 300 {
return fmt.Errorf("server returned bad status code")
}
return nil
}

0 comments on commit a06a626

Please sign in to comment.