Compare commits

...

1 Commits

Author SHA1 Message Date
c3b8d84968
there is no JSON response in fast mode 2020-03-06 01:34:28 -06:00

View File

@ -71,6 +71,10 @@ func (c *Client) SetState(selector string, state State) ([]Result, error) {
defer resp.Body.Close()
if state.Fast && resp.StatusCode == http.StatusAccepted {
return nil, nil
}
if err = json.NewDecoder(resp.Body).Decode(&s); err != nil {
log.Println(err)
return nil, err