mirror of
https://github.com/status-im/status-go.git
synced 2025-01-21 20:20:29 +00:00
Add logs when rate limited peer
This commit is contained in:
parent
14f4c40404
commit
1237cc9ac6
@ -1099,7 +1099,9 @@ func (w *Waku) HandlePeer(peer common.Peer, rw p2p.MsgReadWriter) error {
|
||||
if w.rateLimiter != nil {
|
||||
runLoop := func(out p2p.MsgReadWriter) error {
|
||||
peer.SetRWWriter(out)
|
||||
return peer.Run()
|
||||
err := peer.Run()
|
||||
w.logger.Info("handled peer", zap.String("peerID", types.EncodeHex(peer.ID())), zap.Error(err))
|
||||
return err
|
||||
}
|
||||
return w.rateLimiter.Decorate(peer, rw, runLoop)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user