Simplification

This commit is contained in:
ferhat elmas 2017-12-06 10:52:03 +01:00 committed by Traefiker
parent e2190bd9d5
commit 6890dc1844
3 changed files with 6 additions and 15 deletions

View file

@ -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:
cancel()
return
}
}
<-stop
cancel()
})
f := filters.NewArgs()
f.Add("type", "container")

View file

@ -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:
cancel()
}
<-stop
cancel()
})
operation := func() error {

View file

@ -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:
cancel()
}
<-stop
cancel()
})
operation := func() error {