We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8874f10 commit 802edccCopy full SHA for 802edcc
common/exceptions/error.go
@@ -7,6 +7,7 @@ import (
7
"net"
8
"net/http"
9
"os"
10
+ "strings"
11
"syscall"
12
_ "unsafe"
13
@@ -65,5 +66,14 @@ func IsClosed(err error) bool {
65
66
}
67
68
func IsCanceled(err error) bool {
- return IsMulti(err, context.Canceled, context.DeadlineExceeded)
69
+ return IsMulti(err, context.Canceled, context.DeadlineExceeded) || isCanceledQuicLike(err)
70
+}
71
+
72
+func isCanceledQuicLike(err error) bool {
73
+ if err == nil {
74
+ return false
75
+ }
76
+ s := err.Error()
77
+ return strings.Contains(s, "canceled by remote with error code 0") ||
78
+ strings.Contains(s, "canceled by local with error code 0")
79
0 commit comments