mirror of
https://github.com/arnaucube/go-ethereum.git
synced 2026-02-28 05:56:45 +01:00
p2p: fix decoding of disconnect reason (fixes #200)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user