Skip to content

Commit

Permalink
add close connection to avoid thousands of conns open
Browse files Browse the repository at this point in the history
  • Loading branch information
maxadamo authored and toni-moreno committed Apr 21, 2020
1 parent 0fbc13a commit ef3b50a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/agent/influxmonitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ func (im *InfluxMonitor) InitPing() (client.Client, time.Duration, string, error
}

response, err4 := con.Query(q)
con.Close()
if err4 == nil && response.Error() == nil {
log.Tracef("SHOW DATABASES On InitPint: %+v", response.Results)
im.lastcli = con
Expand Down

0 comments on commit ef3b50a

Please sign in to comment.