diff --git a/server.go b/server.go index 38e43326d..d916c1d91 100644 --- a/server.go +++ b/server.go @@ -551,14 +551,13 @@ func (c *serverConn) run(sctx context.Context) { // TODO(stevvooe): Not wildly clear what we should do in this // branch. Basically, it means that we are no longer receiving // requests due to a terminal error. - recvErr = nil // connection is now "closing" if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) || errors.Is(err, syscall.ECONNRESET) { // The client went away and we should stop processing // requests, so that the client connection is closed return } log.G(ctx).WithError(err).Error("error receiving message") - // else, initiate shutdown + return case <-shutdown: return }