Simplification
This commit is contained in:
parent
e2190bd9d5
commit
6890dc1844
3 changed files with 6 additions and 15 deletions
|
@ -190,13 +190,8 @@ func (p *Provider) Provide(configurationChan chan<- types.ConfigMessage, pool *s
|
|||
|
||||
} else {
|
||||
pool.Go(func(stop chan bool) {
|
||||
for {
|
||||
select {
|
||||
case <-stop:
|
||||
<-stop
|
||||
cancel()
|
||||
return
|
||||
}
|
||||
}
|
||||
})
|
||||
f := filters.NewArgs()
|
||||
f.Add("type", "container")
|
||||
|
|
|
@ -155,10 +155,8 @@ func (p *Provider) Provide(configurationChan chan<- types.ConfigMessage, pool *s
|
|||
pool.Go(func(stop chan bool) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
safe.Go(func() {
|
||||
select {
|
||||
case <-stop:
|
||||
<-stop
|
||||
cancel()
|
||||
}
|
||||
})
|
||||
|
||||
operation := func() error {
|
||||
|
|
|
@ -114,10 +114,8 @@ func (p *Provider) Provide(configurationChan chan<- types.ConfigMessage, pool *s
|
|||
pool.Go(func(stop chan bool) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
safe.Go(func() {
|
||||
select {
|
||||
case <-stop:
|
||||
<-stop
|
||||
cancel()
|
||||
}
|
||||
})
|
||||
|
||||
operation := func() error {
|
||||
|
|
Loading…
Reference in a new issue