diff options
Diffstat (limited to 'p2p/protocol.go')
-rw-r--r-- | p2p/protocol.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/p2p/protocol.go b/p2p/protocol.go index 28eab87cd..3f52205f5 100644 --- a/p2p/protocol.go +++ b/p2p/protocol.go @@ -154,12 +154,11 @@ func (bp *baseProtocol) handle(rw MsgReadWriter) error { return newPeerError(errProtocolBreach, "extra handshake received") case discMsg: - var reason DiscReason + var reason [1]DiscReason if err := msg.Decode(&reason); err != nil { return err } - bp.peer.Disconnect(reason) - return nil + return discRequestedError(reason[0]) case pingMsg: return bp.rw.EncodeMsg(pongMsg) |