Commit 62c986d5 authored by Jeromy's avatar Jeromy

demote errors to warnings

License: MIT
Signed-off-by: default avatarJeromy <why@ipfs.io>
parent f81f6ca6
...@@ -109,7 +109,7 @@ func (dht *IpfsDHT) putValueToPeer(ctx context.Context, p peer.ID, ...@@ -109,7 +109,7 @@ func (dht *IpfsDHT) putValueToPeer(ctx context.Context, p peer.ID,
rpmes, err := dht.sendRequest(ctx, p, pmes) rpmes, err := dht.sendRequest(ctx, p, pmes)
switch err { switch err {
case ErrReadTimeout: case ErrReadTimeout:
log.Errorf("read timeout: %s %s", p, key) log.Warningf("read timeout: %s %s", p.Pretty(), key)
fallthrough fallthrough
default: default:
return err return err
...@@ -179,7 +179,7 @@ func (dht *IpfsDHT) getValueSingle(ctx context.Context, p peer.ID, ...@@ -179,7 +179,7 @@ func (dht *IpfsDHT) getValueSingle(ctx context.Context, p peer.ID,
case nil: case nil:
return resp, nil return resp, nil
case ErrReadTimeout: case ErrReadTimeout:
log.Errorf("read timeout: %s %s", p, key) log.Warningf("read timeout: %s %s", p.Pretty(), key)
fallthrough fallthrough
default: default:
return nil, err return nil, err
...@@ -262,7 +262,7 @@ func (dht *IpfsDHT) findPeerSingle(ctx context.Context, p peer.ID, id peer.ID) ( ...@@ -262,7 +262,7 @@ func (dht *IpfsDHT) findPeerSingle(ctx context.Context, p peer.ID, id peer.ID) (
case nil: case nil:
return resp, nil return resp, nil
case ErrReadTimeout: case ErrReadTimeout:
log.Errorf("read timeout: %s %s", p, id) log.Warningf("read timeout: %s %s", p.Pretty(), id)
fallthrough fallthrough
default: default:
return nil, err return nil, err
...@@ -278,7 +278,7 @@ func (dht *IpfsDHT) findProvidersSingle(ctx context.Context, p peer.ID, key key. ...@@ -278,7 +278,7 @@ func (dht *IpfsDHT) findProvidersSingle(ctx context.Context, p peer.ID, key key.
case nil: case nil:
return resp, nil return resp, nil
case ErrReadTimeout: case ErrReadTimeout:
log.Errorf("read timeout: %s %s", p, key) log.Warningf("read timeout: %s %s", p.Pretty(), key)
fallthrough fallthrough
default: default:
return nil, err return nil, err
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment