diff --git a/plugins/client.go b/plugins/client.go index b54d6f2..0d6be23 100644 --- a/plugins/client.go +++ b/plugins/client.go @@ -101,6 +101,7 @@ func (c *Client) SendFile(serviceMethod string, data io.Reader, ret interface{}) if err != nil { return err } + defer body.Close() if err := json.NewDecoder(body).Decode(&ret); err != nil { logrus.Errorf("%s: error reading plugin resp: %v", serviceMethod, err) return err