Skip to content

Commit

Permalink
Fix a panic on haproxy reload (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
awlx authored and fionera committed Oct 16, 2023
1 parent 61b42a8 commit 75c52fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion peers/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"io"
"log"
"net"
"syscall"
"time"
)

Expand Down Expand Up @@ -257,7 +258,7 @@ func (c *Conn) serve() {

for {
err := c.Read()
if errors.Is(err, net.ErrClosed) || errors.Is(err, io.EOF) {
if errors.Is(err, net.ErrClosed) || errors.Is(err, io.EOF) || errors.Is(err, syscall.ECONNRESET) {
return
}

Expand Down

0 comments on commit 75c52fb

Please sign in to comment.