mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-13 11:36:37 +00:00
p2p: log disconnect requests
This helps a lot with debugging.
This commit is contained in:
parent
5ba51594c7
commit
a7bced779a
1 changed files with 1 additions and 0 deletions
|
|
@ -198,6 +198,7 @@ func (p *Peer) handle(msg Msg) error {
|
||||||
// no need to discard or for error checking, we'll close the
|
// no need to discard or for error checking, we'll close the
|
||||||
// connection after this.
|
// connection after this.
|
||||||
rlp.Decode(msg.Payload, &reason)
|
rlp.Decode(msg.Payload, &reason)
|
||||||
|
p.Debugf("Disconnect requested: %v\n", reason[0])
|
||||||
p.Disconnect(DiscRequested)
|
p.Disconnect(DiscRequested)
|
||||||
return discRequestedError(reason[0])
|
return discRequestedError(reason[0])
|
||||||
case msg.Code < baseProtocolLength:
|
case msg.Code < baseProtocolLength:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue