fix: Close notifier Poll goroutine on stop (#3252)

Fix towards #3221.
This commit is contained in:
Mathias Fredriksson
2022-07-27 20:26:13 +03:00
committed by GitHub
parent 6377f17fda
commit a0320f455a
2 changed files with 34 additions and 5 deletions

View File

@ -90,9 +90,10 @@ func TestNotifier(t *testing.T) {
}
var wg sync.WaitGroup
go func() {
defer wg.Done()
n := notify.New(cond, testCase.Countdown...)
defer n.Close()
n.Poll(ch)
wg.Done()
}()
wg.Add(1)
for _, tick := range testCase.Ticks {