pushMsg should just call maybePublishMessage when it doesn't need validation
This commit is contained in:
parent
473a5d2873
commit
f6081fb061
@ -386,14 +386,7 @@ func (p *PubSub) pushMsg(subs []*Subscription, src peer.ID, msg *Message) {
|
||||
return
|
||||
}
|
||||
|
||||
sreq := &sendReq{from: src, msg: msg}
|
||||
select {
|
||||
case p.sendMsg <- sreq:
|
||||
default:
|
||||
go func() {
|
||||
p.sendMsg <- sreq
|
||||
}()
|
||||
}
|
||||
p.maybePublishMessage(src, msg.Message)
|
||||
}
|
||||
|
||||
// validate performs validation and only sends the message if all validators succeed
|
||||
|
Loading…
x
Reference in New Issue
Block a user