Increment WaitGroup before launching advertiseEvents goroutine
This commit is contained in:
parent
2803146673
commit
94b6455577
@ -273,10 +273,8 @@ func (r *router) advertiseTable() error {
|
|||||||
|
|
||||||
// advertise all routes as Update events to subscribers
|
// advertise all routes as Update events to subscribers
|
||||||
if len(events) > 0 {
|
if len(events) > 0 {
|
||||||
go func() {
|
r.advertWg.Add(1)
|
||||||
r.advertWg.Add(1)
|
go r.advertiseEvents(Update, events)
|
||||||
r.advertiseEvents(Update, events)
|
|
||||||
}()
|
|
||||||
}
|
}
|
||||||
case <-r.exit:
|
case <-r.exit:
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user