Skip to content

Commit 49b1743

Browse files
Konstantinos Koukasemersion
Konstantinos Koukas
authored andcommitted
server: handle closed connection error
1 parent 201c9ab commit 49b1743

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ func (s *Server) handleConn(c *Conn) error {
182182

183183
c.handle(cmd, arg)
184184
} else {
185-
if err == io.EOF {
185+
if err == io.EOF || errors.Is(err, net.ErrClosed) {
186186
return nil
187187
}
188188
if err == ErrTooLongLine {

0 commit comments

Comments
 (0)