eth: don't block if transaction broadcast loop fails (#21255)

* eth: don't block if transaction broadcast loop is returned

* eth: kick out peer if we failed to send message

* eth: address comment
This commit is contained in:
gary rong
2020-06-24 18:54:13 +08:00
committed by GitHub
parent 23f1a0b783
commit 93142e50c3
2 changed files with 12 additions and 8 deletions

View File

@ -325,7 +325,7 @@ func (pm *ProtocolManager) handle(p *peer) error {
}
// Register the peer locally
if err := pm.peers.Register(p); err != nil {
if err := pm.peers.Register(p, pm.removePeer); err != nil {
p.Log().Error("Ethereum peer registration failed", "err", err)
return err
}