ensure http bodies closed, matrix client some kinda closed
This commit is contained in:
@@ -374,6 +374,9 @@ func (ntg NTGVision) _searchStates(states []config.State) (io.ReadCloser, error)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
b, _ := ioutil.ReadAll(resp.Body)
|
||||
resp.Body = io.NopCloser(bytes.NewReader(b))
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
b, _ := ioutil.ReadAll(resp.Body)
|
||||
resp.Body.Close()
|
||||
|
||||
Reference in New Issue
Block a user