Skip to content

Commit

Permalink
p2p: fix decoding of disconnect reason (fixes #200)
Browse files Browse the repository at this point in the history
  • Loading branch information
fjl committed Dec 12, 2014
1 parent ce0c4e5 commit 9423401
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions p2p/protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9423401

Please sign in to comment.