We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2613be commit 4b2e1b7Copy full SHA for 4b2e1b7
grpc/cancel.go
@@ -2,14 +2,15 @@ package grpc
2
3
import (
4
"context"
5
+ "errors"
6
7
"google.golang.org/grpc/codes"
8
"google.golang.org/grpc/status"
9
)
10
11
// IsCanceled checks whether an error comes from an operation being canceled
12
func IsCanceled(err error) bool {
- if err == context.Canceled {
13
+ if errors.Is(err, context.Canceled) {
14
return true
15
}
16
s, ok := status.FromError(err)
0 commit comments