Merge pull request #757 from milosgajdos83/empty-advert

Skip processing Advert which carries no events
This commit is contained in:
Asim Aslam 2019-09-13 17:29:36 -07:00 committed by GitHub
commit e5f6480f8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -585,6 +585,11 @@ func (n *network) processCtrlChan(client transport.Client, listener tunnel.Liste
} }
events = append(events, e) events = append(events, e)
} }
// if no events are eligible for processing continue
if len(events) == 0 {
log.Debugf("Network no events to be processed by router: %s", n.options.Id)
continue
}
// create an advert and process it // create an advert and process it
advert := &router.Advert{ advert := &router.Advert{
Id: pbRtrAdvert.Id, Id: pbRtrAdvert.Id,