aboutsummaryrefslogtreecommitdiffstats
path: root/p2p
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2014-12-09 20:39:56 +0800
committerFelix Lange <fjl@twurst.com>2014-12-12 18:40:02 +0800
commit9423401d73562b2a55398559a9d21af75210d955 (patch)
treedc096c59785faf80517d4ee27c19e9bb9c57ee4b /p2p
parentce0c4e5d860d4c5dc3c9142dcc24b770ede156d1 (diff)
downloaddexon-9423401d73562b2a55398559a9d21af75210d955.tar
dexon-9423401d73562b2a55398559a9d21af75210d955.tar.gz
dexon-9423401d73562b2a55398559a9d21af75210d955.tar.bz2
dexon-9423401d73562b2a55398559a9d21af75210d955.tar.lz
dexon-9423401d73562b2a55398559a9d21af75210d955.tar.xz
dexon-9423401d73562b2a55398559a9d21af75210d955.tar.zst
dexon-9423401d73562b2a55398559a9d21af75210d955.zip
p2p: fix decoding of disconnect reason (fixes #200)
Diffstat (limited to 'p2p')
-rw-r--r--p2p/protocol.go4
1 files changed, 2 insertions, 2 deletions
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: