Revisit waitgroup (#241)
* Fix Add to waitgroup out of goroutines calling wg.Done() * Pass waitgroup to other loop functions
This commit is contained in:
@@ -98,7 +98,6 @@ func (l *looper) SetAllServers(allServers models.AllServers) {
|
||||
}
|
||||
|
||||
func (l *looper) Run(ctx context.Context, wg *sync.WaitGroup) {
|
||||
wg.Add(1)
|
||||
defer wg.Done()
|
||||
select {
|
||||
case <-l.restart:
|
||||
|
||||
Reference in New Issue
Block a user