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:
Derrick J. Wippler 2022-05-23 11:55:35 -05:00 committed by GitHub
commit 87609ae02e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {