Skip to content
Snippets Groups Projects
Unverified Commit 59f0a535 authored by Daniel Nelson's avatar Daniel Nelson
Browse files

Log if connection is closed on write error

parent c8b68430
No related branches found
No related tags found
No related merge requests found
......@@ -137,6 +137,7 @@ func (sw *SocketWriter) Write(metrics []telegraf.Metric) error {
// permanent error. close the connection
sw.Close()
sw.Conn = nil
return fmt.Errorf("closing connection: %v", err)
}
return err
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment