mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-06 19:35:04 +00:00
skip messages properly
This commit is contained in:
parent
a45e293267
commit
0acdeca3d6
1 changed files with 3 additions and 3 deletions
6
peer.go
6
peer.go
|
|
@ -314,14 +314,14 @@ func (p *Peer) HandleOutbound() {
|
|||
|
||||
out:
|
||||
for {
|
||||
skip:
|
||||
select {
|
||||
// Main message queue. All outbound messages are processed through here
|
||||
case msg := <-p.outputQueue:
|
||||
if !p.statusKnown {
|
||||
switch msg.Type {
|
||||
case ethwire.MsgGetTxsTy, ethwire.MsgGetBlockHashesTy, ethwire.MsgGetBlocksTy, ethwire.MsgBlockHashesTy, ethwire.MsgBlockTy:
|
||||
peerlogger.Debugln("Blocked outgoing [eth] message to peer without the [eth] cap.")
|
||||
break
|
||||
case ethwire.MsgStatusTy, ethwire.MsgGetTxsTy, ethwire.MsgTxTy, ethwire.MsgGetBlockHashesTy, ethwire.MsgBlockHashesTy, ethwire.MsgGetBlocksTy, ethwire.MsgBlockTy:
|
||||
break skip
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue