Fix sqlserver connection closing on error (#5897)

This commit is contained in:
Arno den Uijl 2019-05-22 22:13:19 +02:00 committed by Daniel Nelson
parent 6ed2b64b6c
commit adc32002da
1 changed files with 0 additions and 6 deletions

View File

@ -151,12 +151,6 @@ func (s *SQLServer) gatherServer(server string, query Query, acc telegraf.Accumu
if err != nil {
return err
}
// verify that a connection can be made before making a query
err = conn.Ping()
if err != nil {
// Handle error
return err
}
defer conn.Close()
// execute query