From 9dcb339f1282ee958be12145d2ad20965ce5cbe2 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Wed, 12 Jul 2017 07:38:53 -0700 Subject: Fixing client4 ping (#6915) --- model/client4.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'model/client4.go') diff --git a/model/client4.go b/model/client4.go index 996d9362c..5e5942130 100644 --- a/model/client4.go +++ b/model/client4.go @@ -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. 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() return "unhealthy", BuildErrorResponse(r, err) } else if err != nil { -- cgit v1.2.3-1-g7c22