Merge pull request #12538 from lzhfromustc/12_9_GoroutineLeak

test: change channel operations to avoid potential goroutine leaks
This commit is contained in:
Piotr Tabor
2021-02-01 21:16:43 +01:00
committed by GitHub
6 changed files with 20 additions and 18 deletions

View File

@@ -213,7 +213,7 @@ func TestApplyRepeat(t *testing.T) {
// wait for conf change message
act, err := n.Wait(1)
// wait for stop message (async to avoid deadlock)
stopc := make(chan error)
stopc := make(chan error, 1)
go func() {
_, werr := n.Wait(1)
stopc <- werr