From b09c49f581784c1214b58dd21fe5847cfa691ad2 Mon Sep 17 00:00:00 2001 From: Luke Turner Date: Tue, 11 Apr 2017 09:50:32 -0700 Subject: [PATCH] Don't retry sending on ECONNRESET --- adapters/syslog/syslog.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adapters/syslog/syslog.go b/adapters/syslog/syslog.go index e89479e0..142fea7b 100644 --- a/adapters/syslog/syslog.go +++ b/adapters/syslog/syslog.go @@ -9,6 +9,7 @@ import ( "net" "os" "strconv" + "syscall" "text/template" "time" @@ -139,7 +140,7 @@ func (a *Adapter) Stream(logstream chan *router.Message) { func (a *Adapter) retry(buf []byte, err error) error { if opError, ok := err.(*net.OpError); ok { - if opError.Temporary() || opError.Timeout() { + if (opError.Temporary() && opError.Err != syscall.ECONNRESET) || opError.Timeout() { retryErr := a.retryTemporary(buf) if retryErr == nil { return nil