Flux: Ensure connections to InflxuDB are closed (#26735)

* Flux: Ensure connections to InflxuDB are closed
This commit is contained in:
Paul Sneddon 2020-07-31 22:11:51 +01:00 committed by GitHub
parent 7589b1b517
commit ec756f3729
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,6 +29,7 @@ func Query(ctx context.Context, dsInfo *models.DataSource, tsdbQuery *tsdb.TsdbQ
if err != nil { if err != nil {
return nil, err return nil, err
} }
defer runner.client.Close()
for _, query := range tsdbQuery.Queries { for _, query := range tsdbQuery.Queries {
qm, err := GetQueryModelTSDB(query, tsdbQuery.TimeRange, dsInfo) qm, err := GetQueryModelTSDB(query, tsdbQuery.TimeRange, dsInfo)