From 9423401d73562b2a55398559a9d21af75210d955 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 9 Dec 2014 13:39:56 +0100 Subject: p2p: fix decoding of disconnect reason (fixes #200) --- p2p/protocol.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'p2p/protocol.go') diff --git a/p2p/protocol.go b/p2p/protocol.go index 28eab87cd..5af586f13 100644 --- a/p2p/protocol.go +++ b/p2p/protocol.go @@ -154,11 +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) + bp.peer.Disconnect(reason[0]) return nil case pingMsg: -- cgit