mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-05 00:08:06 +08:00
demote errors to warnings
License: MIT Signed-off-by: Jeromy <why@ipfs.io>
This commit is contained in:
parent
f81f6ca6a6
commit
62c986d5c2
@ -109,7 +109,7 @@ func (dht *IpfsDHT) putValueToPeer(ctx context.Context, p peer.ID,
|
||||
rpmes, err := dht.sendRequest(ctx, p, pmes)
|
||||
switch err {
|
||||
case ErrReadTimeout:
|
||||
log.Errorf("read timeout: %s %s", p, key)
|
||||
log.Warningf("read timeout: %s %s", p.Pretty(), key)
|
||||
fallthrough
|
||||
default:
|
||||
return err
|
||||
@ -179,7 +179,7 @@ func (dht *IpfsDHT) getValueSingle(ctx context.Context, p peer.ID,
|
||||
case nil:
|
||||
return resp, nil
|
||||
case ErrReadTimeout:
|
||||
log.Errorf("read timeout: %s %s", p, key)
|
||||
log.Warningf("read timeout: %s %s", p.Pretty(), key)
|
||||
fallthrough
|
||||
default:
|
||||
return nil, err
|
||||
@ -262,7 +262,7 @@ func (dht *IpfsDHT) findPeerSingle(ctx context.Context, p peer.ID, id peer.ID) (
|
||||
case nil:
|
||||
return resp, nil
|
||||
case ErrReadTimeout:
|
||||
log.Errorf("read timeout: %s %s", p, id)
|
||||
log.Warningf("read timeout: %s %s", p.Pretty(), id)
|
||||
fallthrough
|
||||
default:
|
||||
return nil, err
|
||||
@ -278,7 +278,7 @@ func (dht *IpfsDHT) findProvidersSingle(ctx context.Context, p peer.ID, key key.
|
||||
case nil:
|
||||
return resp, nil
|
||||
case ErrReadTimeout:
|
||||
log.Errorf("read timeout: %s %s", p, key)
|
||||
log.Warningf("read timeout: %s %s", p.Pretty(), key)
|
||||
fallthrough
|
||||
default:
|
||||
return nil, err
|
||||
|
||||
Loading…
Reference in New Issue
Block a user