diff --git a/common/exceptions/error.go b/common/exceptions/error.go index 3f08ac4..0f33792 100644 --- a/common/exceptions/error.go +++ b/common/exceptions/error.go @@ -40,11 +40,11 @@ func Extend(cause error, message ...any) error { } func IsClosedOrCanceled(err error) bool { - return IsMulti(err, io.EOF, net.ErrClosed, io.ErrClosedPipe, os.ErrClosed, syscall.EPIPE, syscall.ECONNRESET, context.Canceled, context.DeadlineExceeded) || IsTimeout(err) + return IsClosed(err) || IsCanceled(err) || IsTimeout(err) } func IsClosed(err error) bool { - return IsMulti(err, io.EOF, net.ErrClosed, io.ErrClosedPipe, os.ErrClosed, syscall.EPIPE, syscall.ECONNRESET) + return IsMulti(err, io.EOF, net.ErrClosed, io.ErrClosedPipe, os.ErrClosed, syscall.EPIPE, syscall.ECONNRESET, syscall.ENOTCONN) } func IsCanceled(err error) bool {