feat: do not count context cancelation as peer error

This commit is contained in:
Leo Antunes 2022-04-04 17:44:56 +02:00
parent ef11a3aea7
commit f0dbe185e0
No known key found for this signature in database

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 {