Check for connection errors during event transit in elasticsearch and webhook (#8273)

This commit is contained in:
Praveen raj Mani 2019-09-19 20:53:43 +05:30 committed by Harshavardhana
parent 0e1408844b
commit dc0dce9beb
2 changed files with 6 additions and 0 deletions

View File

@ -171,6 +171,9 @@ func (target *ElasticsearchTarget) Send(eventKey string) error {
}
if err := target.send(eventData); err != nil {
if xnet.IsNetworkOrHostDown(err) {
return errNotConnected
}
return err
}

View File

@ -155,6 +155,9 @@ func (target *WebhookTarget) Send(eventKey string) error {
}
if err := target.send(eventData); err != nil {
if xnet.IsNetworkOrHostDown(err) {
return errNotConnected
}
return err
}