mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-22 16:36:30 +00:00
Fix health check (#2412)
Fix https://github.com/woodpecker-ci/woodpecker/issues/2370
This commit is contained in:
parent
6d59bd1130
commit
a06a626666
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue