make them debug (#5891)

This commit is contained in:
Nishant Das 2020-05-18 14:27:18 +08:00 committed by GitHub
parent 343bee35bc
commit 5bb9278a88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@ func setStreamReadDeadline(stream network.Stream, duration time.Duration) {
// libp2p uses the system clock time for determining the deadline so we use // libp2p uses the system clock time for determining the deadline so we use
// time.Now() instead of the synchronized roughtime.Now(). // time.Now() instead of the synchronized roughtime.Now().
if err := stream.SetReadDeadline(time.Now().Add(duration)); err != nil { if err := stream.SetReadDeadline(time.Now().Add(duration)); err != nil {
log.WithError(err).Error("Failed to set stream deadline") log.WithError(err).Debug("Failed to set stream deadline")
} }
} }
@ -27,6 +27,6 @@ func setStreamWriteDeadline(stream network.Stream, duration time.Duration) {
// libp2p uses the system clock time for determining the deadline so we use // libp2p uses the system clock time for determining the deadline so we use
// time.Now() instead of the synchronized roughtime.Now(). // time.Now() instead of the synchronized roughtime.Now().
if err := stream.SetWriteDeadline(time.Now().Add(duration)); err != nil { if err := stream.SetWriteDeadline(time.Now().Add(duration)); err != nil {
log.WithError(err).Error("Failed to set stream deadline") log.WithError(err).Debug("Failed to set stream deadline")
} }
} }

View File

@ -35,7 +35,7 @@ func (r *Service) pingHandler(ctx context.Context, msg interface{}, stream libp2
go func() { go func() {
md, err := r.sendMetaDataRequest(ctx, stream.Conn().RemotePeer()) md, err := r.sendMetaDataRequest(ctx, stream.Conn().RemotePeer())
if err != nil { if err != nil {
log.WithField("peer", stream.Conn().RemotePeer()).WithError(err).Error("Failed to send metadata request") log.WithField("peer", stream.Conn().RemotePeer()).WithError(err).Debug("Failed to send metadata request")
return return
} }
// update metadata if there is no error // update metadata if there is no error