Skip to content

Commit 20c493e

Browse files
authored
Merge pull request #143 from dmcgowan/backport-1.1-error-unwrap
[release/1.1] Unwrap io errors in server connection receive error handling
2 parents e1f0dab + d5f7eed commit 20c493e

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
@@ -468,7 +468,7 @@ func (c *serverConn) run(sctx context.Context) {
468468
// branch. Basically, it means that we are no longer receiving
469469
// requests due to a terminal error.
470470
recvErr = nil // connection is now "closing"
471-
if err == io.EOF || err == io.ErrUnexpectedEOF || errors.Is(err, syscall.ECONNRESET) {
471+
if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) || errors.Is(err, syscall.ECONNRESET) {
472472
// The client went away and we should stop processing
473473
// requests, so that the client connection is closed
474474
return

0 commit comments

Comments
 (0)