mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-26 20:01:02 +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
|
return err
|
||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
if resp.StatusCode != http.StatusOK {
|
if resp.StatusCode < 200 && resp.StatusCode >= 300 {
|
||||||
return fmt.Errorf("server returned non-200 status code")
|
return fmt.Errorf("server returned bad status code")
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue