Log if connection is closed on write error
This commit is contained in:
@@ -137,6 +137,7 @@ func (sw *SocketWriter) Write(metrics []telegraf.Metric) error {
|
|||||||
// permanent error. close the connection
|
// permanent error. close the connection
|
||||||
sw.Close()
|
sw.Close()
|
||||||
sw.Conn = nil
|
sw.Conn = nil
|
||||||
|
return fmt.Errorf("closing connection: %v", err)
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user