mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-08-02 01:23:11 +00:00
Fix health check (#2412)
Fix https://github.com/woodpecker-ci/woodpecker/issues/2370
This commit is contained in:
parent
6d59bd1130
commit
a06a626666
@ -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 New Issue
Block a user