aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/protocol.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-15 19:22:03 +0800
committerobscuren <geffobscura@gmail.com>2014-12-15 19:22:03 +0800
commitbd9088792b0a7bcac00f28289a08bd1b8359316f (patch)
tree5d42f64861a8b30c0ba12719e79d0c456d1a501a /p2p/protocol.go
parentcdb2ebbdfa510294b8443e33c32f9e0ec414f78e (diff)
parentc3ba4ace64a99d324b20b27574b5e5066ce14e54 (diff)
downloadgo-tangerine-bd9088792b0a7bcac00f28289a08bd1b8359316f.tar
go-tangerine-bd9088792b0a7bcac00f28289a08bd1b8359316f.tar.gz
go-tangerine-bd9088792b0a7bcac00f28289a08bd1b8359316f.tar.bz2
go-tangerine-bd9088792b0a7bcac00f28289a08bd1b8359316f.tar.lz
go-tangerine-bd9088792b0a7bcac00f28289a08bd1b8359316f.tar.xz
go-tangerine-bd9088792b0a7bcac00f28289a08bd1b8359316f.tar.zst
go-tangerine-bd9088792b0a7bcac00f28289a08bd1b8359316f.zip
Merge branch 'develop' into ethersphere-ethp2p
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)