aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/protocol.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2014-12-22 01:42:32 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2014-12-22 01:42:32 +0800
commit1360f027d9e365242466ca346b2b56f421729d91 (patch)
treea30ff7292e87583781b682b47d851d0f6e1925fc /p2p/protocol.go
parentb3629c6f62bd3774eb8858819a8ee07dfb775b73 (diff)
parent795b14330ad4399ef292835eac452d258dcd7464 (diff)
downloaddexon-1360f027d9e365242466ca346b2b56f421729d91.tar.gz
dexon-1360f027d9e365242466ca346b2b56f421729d91.tar.zst
dexon-1360f027d9e365242466ca346b2b56f421729d91.zip
Merge pull request #216 from ethereum/develop
Update tests branch from develop
Diffstat (limited to 'p2p/protocol.go')
-rw-r--r--p2p/protocol.go5
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)