cleanup
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
a39a2f398a
commit
e430c15ae8
@ -57,8 +57,9 @@ func (g *WaitGroup) WaitContext(ctx context.Context) {
|
|||||||
|
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
|
g.drain.Store(true)
|
||||||
g.wg.Add(-int(g.c.Load()))
|
g.wg.Add(-int(g.c.Load()))
|
||||||
<-done
|
g.drain.Store(false)
|
||||||
return
|
return
|
||||||
case <-done:
|
case <-done:
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user