mirror of
https://github.com/mailgun/groupcache.git
synced 2024-09-28 14:50:57 +00:00
feat: do not count context cancelation as peer error
This commit is contained in:
parent
ef11a3aea7
commit
f0dbe185e0
@ -386,6 +386,9 @@ func (g *Group) load(ctx context.Context, key string, dest Sink) (value ByteView
|
||||
if err == nil {
|
||||
g.Stats.PeerLoads.Add(1)
|
||||
return value, nil
|
||||
} else if errors.Is(err, context.Canceled) {
|
||||
// do not count context cancellation as a peer error
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if logger != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user