forked from Ivasoft/traefik
Simplification
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user