Fixing client4 ping (#6915)
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
9ee7f661c7
Коммит
9dcb339f12
@@ -1811,7 +1811,7 @@ func (c *Client4) GetFileInfosForPost(postId string, etag string) ([]*FileInfo,
|
|||||||
|
|
||||||
// GetPing will return ok if the running goRoutines are below the threshold and unhealthy for above.
|
// GetPing will return ok if the running goRoutines are below the threshold and unhealthy for above.
|
||||||
func (c *Client4) GetPing() (string, *Response) {
|
func (c *Client4) GetPing() (string, *Response) {
|
||||||
if r, err := c.DoApiGet(c.GetSystemRoute()+"/ping", ""); r.StatusCode == 500 {
|
if r, err := c.DoApiGet(c.GetSystemRoute()+"/ping", ""); r != nil && r.StatusCode == 500 {
|
||||||
defer r.Body.Close()
|
defer r.Body.Close()
|
||||||
return "unhealthy", BuildErrorResponse(r, err)
|
return "unhealthy", BuildErrorResponse(r, err)
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user