log when validator discards message
This commit is contained in:
parent
930f264a27
commit
1945f895a2
|
@ -187,7 +187,6 @@ func (p *PubSub) processLoop(ctx context.Context) {
|
|||
from: p.host.ID(),
|
||||
msg: msg,
|
||||
}
|
||||
|
||||
}
|
||||
}()
|
||||
case req := <-p.sendMsg:
|
||||
|
@ -350,6 +349,7 @@ func msgID(pmsg *pb.Message) string {
|
|||
func (p *PubSub) validate(subs []*Subscription, msg *Message) bool {
|
||||
for _, sub := range subs {
|
||||
if sub.validate != nil && !sub.validate(msg) {
|
||||
log.Debugf("validator for topic %s returned false", sub.topic)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue