ignore reset by peer error

This commit is contained in:
Josh Baker 2018-04-19 10:28:04 -07:00
parent 22be725b45
commit d2da9ca6ee

View File

@ -117,11 +117,11 @@ func handleConn(
ok := func() bool { ok := func() bool {
msgs, err := rd.ReadMessages() msgs, err := rd.ReadMessages()
if err != nil { if err != nil {
if err == io.EOF { errstr := err.Error()
return false
}
if err == errCloseHTTP || if err == errCloseHTTP ||
strings.Contains(err.Error(), "use of closed network connection") { err == io.EOF ||
strings.Contains(errstr, "use of closed network connection") ||
strings.Contains(errstr, "connection reset by peer") {
return false return false
} }
log.Error(err) log.Error(err)