Browse Source

stop peer if it sends us msg with unknown channel

pull/1244/head
Anton Kaliaev 7 years ago
parent
commit
d86855ad7a
No known key found for this signature in database GPG Key ID: 7B6881D965918214
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      p2p/peer.go

+ 1
- 1
p2p/peer.go View File

@ -358,7 +358,7 @@ func createMConnection(conn net.Conn, p *peer, reactorsByCh map[byte]Reactor, ch
onReceive := func(chID byte, msgBytes []byte) {
reactor := reactorsByCh[chID]
if reactor == nil {
cmn.PanicSanity(cmn.Fmt("Unknown channel %X", chID))
onPeerError(p, fmt.Errorf("Unknown channel %X", chID))
}
reactor.Receive(chID, p, msgBytes)
}


Loading…
Cancel
Save