log when validator discards message

This commit is contained in:
keks 2017-11-16 13:03:33 +01:00 committed by vyzo
parent 930f264a27
commit 1945f895a2
1 changed files with 1 additions and 1 deletions

View File

@ -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
}
}