diff --git a/weed/wdclient/filer_client.go b/weed/wdclient/filer_client.go index 4a2802d484..345bac1cab 100644 --- a/weed/wdclient/filer_client.go +++ b/weed/wdclient/filer_client.go @@ -2,7 +2,6 @@ package wdclient import ( "context" - "errors" "fmt" "math/rand" "strings" @@ -791,9 +790,9 @@ func (p *filerVolumeProvider) LookupVolumeIds(ctx context.Context, volumeIds []s if err != nil { // a caller that gave up says nothing about this filer; gRPC can // surface its own DeadlineExceeded a tick before ctx.Err() - // becomes visible, so reinterpret only deadline errors this way + // becomes visible, so reinterpret only cancellation errors this way ctxErr := ctx.Err() - if ctxErr == nil && (errors.Is(err, context.DeadlineExceeded) || status.Code(err) == codes.DeadlineExceeded) { + if ctxErr == nil && isCanceledErr(err) { if dl, ok := ctx.Deadline(); ok && !dl.After(time.Now()) { ctxErr = context.DeadlineExceeded }