Merge pull request #23 from reddec/feature/close_connection

Fix close connection after usage
This commit is contained in:
llya Kowalewski 2015-11-12 20:06:14 +02:00
commit 4b7ee3b796

2
api.go
View File

@ -22,7 +22,7 @@ func sendCommand(method string, token string, params url.Values) ([]byte, error)
if err != nil {
return []byte{}, err
}
resp.Close = true
defer resp.Body.Close()
json, err := ioutil.ReadAll(resp.Body)
if err != nil {