client.go: format err

This commit is contained in:
fangyuhao [方宇浩] 2017-05-11 18:17:33 +08:00
parent 9a0f5ccb33
commit 5976b9c8a3

View File

@ -256,9 +256,8 @@ func (c *mesosClient) pollMasterForState(ctx context.Context) (*mesosState, erro
}
defer res.Body.Close()
if handler, ok := tt.handlers[res.StatusCode]; ok {
err1 := handler(res)
if err1 != nil {
return err1
if err := handler(res); err != nil {
return err
}
}
// no handler for this error code, proceed to the next connection type