浏览代码

p2p: log disconnect requests

This helps a lot with debugging.
Felix Lange 10 年之前
父节点
当前提交
a7bced779a
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      p2p/peer.go

+ 1 - 0
p2p/peer.go

@@ -198,6 +198,7 @@ func (p *Peer) handle(msg Msg) error {
 		// no need to discard or for error checking, we'll close the
 		// connection after this.
 		rlp.Decode(msg.Payload, &reason)
+		p.Debugf("Disconnect requested: %v\n", reason[0])
 		p.Disconnect(DiscRequested)
 		return discRequestedError(reason[0])
 	case msg.Code < baseProtocolLength: