| @@ -57,8 +57,9 @@ func (g *WaitGroup) WaitContext(ctx context.Context) { | ||||
|  | ||||
| 	select { | ||||
| 	case <-ctx.Done(): | ||||
| 		g.drain.Store(true) | ||||
| 		g.wg.Add(-int(g.c.Load())) | ||||
| 		<-done | ||||
| 		g.drain.Store(false) | ||||
| 		return | ||||
| 	case <-done: | ||||
| 		return | ||||
|   | ||||
		Reference in New Issue
	
	Block a user