Browse Source

tech(influxdb): close body reader

bergquist 9 years ago
parent
commit
98a7bf181a
1 changed files with 2 additions and 0 deletions
  1. 2 0
      pkg/tsdb/influxdb/influxdb.go

+ 2 - 0
pkg/tsdb/influxdb/influxdb.go

@@ -68,8 +68,10 @@ func (e *InfluxDBExecutor) Execute(ctx context.Context, queries tsdb.QuerySlice,
 
 	var response Response
 	dec := json.NewDecoder(resp.Body)
+	defer resp.Body.Close()
 	dec.UseNumber()
 	err = dec.Decode(&response)
+
 	if err != nil {
 		return result.WithError(err)
 	}