ignore reset by peer error

This commit is contained in:
Josh Baker 2018-04-19 10:28:04 -07:00
parent 22be725b45
commit d2da9ca6ee
1 changed files with 4 additions and 4 deletions

View File

@ -117,11 +117,11 @@ func handleConn(
ok := func() bool {
msgs, err := rd.ReadMessages()
if err != nil {
if err == io.EOF {
return false
}
errstr := err.Error()
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
}
log.Error(err)