diff options
author | Felix Lange <fjl@twurst.com> | 2014-12-12 18:58:39 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2014-12-15 07:28:20 +0800 |
commit | f0f672777866a524c36e767a6c313f93f574dd8c (patch) | |
tree | 4d9424c3a42153d412f6a4aac31208071a7001cc /p2p/protocol.go | |
parent | 65e39bf20eecf7f3296fba531efb72ac28dc0124 (diff) | |
download | dexon-f0f672777866a524c36e767a6c313f93f574dd8c.tar dexon-f0f672777866a524c36e767a6c313f93f574dd8c.tar.gz dexon-f0f672777866a524c36e767a6c313f93f574dd8c.tar.bz2 dexon-f0f672777866a524c36e767a6c313f93f574dd8c.tar.lz dexon-f0f672777866a524c36e767a6c313f93f574dd8c.tar.xz dexon-f0f672777866a524c36e767a6c313f93f574dd8c.tar.zst dexon-f0f672777866a524c36e767a6c313f93f574dd8c.zip |
p2p: use an error type for disconnect requests
Test-tastic.
Diffstat (limited to 'p2p/protocol.go')
-rw-r--r-- | p2p/protocol.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/p2p/protocol.go b/p2p/protocol.go index 5af586f13..3f52205f5 100644 --- a/p2p/protocol.go +++ b/p2p/protocol.go @@ -158,8 +158,7 @@ func (bp *baseProtocol) handle(rw MsgReadWriter) error { if err := msg.Decode(&reason); err != nil { return err } - bp.peer.Disconnect(reason[0]) - return nil + return discRequestedError(reason[0]) case pingMsg: return bp.rw.EncodeMsg(pongMsg) |