aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/protocol.go
diff options
context:
space:
mode:
Diffstat (limited to 'p2p/protocol.go')
-rw-r--r--p2p/protocol.go3
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)