Don't print Sending EDU if there is noone to send to

This commit is contained in:
Andrew Morgan 2019-06-26 11:35:38 +01:00
parent a0dec456c1
commit b37de99e5f

View file

@ -96,9 +96,11 @@ func (oqs *OutgoingQueues) SendEDU(
// Remove our own server from the list of destinations. // Remove our own server from the list of destinations.
destinations = filterDestinations(oqs.origin, destinations) destinations = filterDestinations(oqs.origin, destinations)
log.WithFields(log.Fields{ if len(destinations) > 0 {
"destinations": destinations, "edu_type": e.Type, log.WithFields(log.Fields{
}).Info("Sending EDU event") "destinations": destinations, "edu_type": e.Type,
}).Info("Sending EDU event")
}
oqs.queuesMutex.Lock() oqs.queuesMutex.Lock()
defer oqs.queuesMutex.Unlock() defer oqs.queuesMutex.Unlock()