mirror of
https://github.com/mailgun/groupcache.git
synced 2024-11-16 14:10:04 +00:00
Merge pull request #41 from exaring/do_not_consider_canceled_context_as_peer_error
feat: do not count context cancelation as peer error
This commit is contained in:
commit
87609ae02e
@ -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