diff options
Diffstat (limited to 'swarm/network/stream/peer.go')
-rw-r--r-- | swarm/network/stream/peer.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/swarm/network/stream/peer.go b/swarm/network/stream/peer.go index 0f1472743..152814bd4 100644 --- a/swarm/network/stream/peer.go +++ b/swarm/network/stream/peer.go @@ -167,9 +167,8 @@ func (p *Peer) SendPriority(ctx context.Context, msg interface{}, priority uint8 Msg: msg, } err := p.pq.Push(wmsg, int(priority)) - if err == pq.ErrContention { - log.Warn("dropping peer on priority queue contention", "peer", p.ID()) - p.Drop(err) + if err != nil { + log.Error("err on p.pq.Push", "err", err, "peer", p.ID()) } return err } @@ -183,6 +182,8 @@ func (p *Peer) SendOfferedHashes(s *server, f, t uint64) error { ) defer sp.Finish() + defer metrics.GetOrRegisterResettingTimer("send.offered.hashes", nil).UpdateSince(time.Now()) + hashes, from, to, proof, err := s.setNextBatch(f, t) if err != nil { return err |