From 9f69e7f9f7e2c4fc26828d98ec9f81ab72fdec98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sun, 1 Dec 2024 20:19:37 +0800 Subject: [PATCH] E: IsClosedOrCanceled check IsTimeout --- common/exceptions/error.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/exceptions/error.go b/common/exceptions/error.go index 16b075a..3f08ac4 100644 --- a/common/exceptions/error.go +++ b/common/exceptions/error.go @@ -40,7 +40,7 @@ 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) + return IsMulti(err, io.EOF, net.ErrClosed, io.ErrClosedPipe, os.ErrClosed, syscall.EPIPE, syscall.ECONNRESET, context.Canceled, context.DeadlineExceeded) || IsTimeout(err) } func IsClosed(err error) bool {