diff --git a/relay/server/listener/quic/conn.go b/relay/server/listener/quic/conn.go index f948896c4..8b8f2c7e5 100644 --- a/relay/server/listener/quic/conn.go +++ b/relay/server/listener/quic/conn.go @@ -91,7 +91,7 @@ func (c *Conn) isClosed() bool { func (c *Conn) ioErrHandling(err error) error { if c.isClosed() { - return io.EOF + return net.ErrClosed } // Handle QUIC-specific errors @@ -102,7 +102,7 @@ func (c *Conn) ioErrHandling(err error) error { // Check if the connection was closed remotely var appErr *quic.ApplicationError if errors.As(err, &appErr) && appErr.ErrorCode == 0 { // 0 is normal closure - return io.EOF + return net.ErrClosed } return err