mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-03 21:33:07 +00:00
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…
x
Reference in New Issue
Block a user