lib: Fix panic due to closed event subscriptions on shutdown (#8079)

This commit is contained in:
Gahl Saraf
2021-12-22 20:16:21 +01:00
committed by GitHub
parent bf7f82f7b2
commit cc39341eb9
4 changed files with 19 additions and 5 deletions
+4 -2
View File
@@ -162,8 +162,10 @@ func (a *aggregator) mainLoop(in <-chan fs.Event, out chan<- []string, cfg confi
select {
case event := <-in:
a.newEvent(event, inProgress)
case event := <-inProgressItemSubscription.C():
updateInProgressSet(event, inProgress)
case event, ok := <-inProgressItemSubscription.C():
if ok {
updateInProgressSet(event, inProgress)
}
case <-a.notifyTimer.C:
a.actOnTimer(out)
case interval := <-a.notifyTimerResetChan: