refactor: add Safe everywhere is needing.
This commit is contained in:
parent
3174fb8861
commit
c36e0b3b06
8 changed files with 30 additions and 19 deletions
|
@ -155,12 +155,12 @@ func (p *Provider) Provide(configurationChan chan<- types.ConfigMessage, pool *s
|
|||
|
||||
pool.Go(func(stop chan bool) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
go func() {
|
||||
safe.Go(func() {
|
||||
select {
|
||||
case <-stop:
|
||||
cancel()
|
||||
}
|
||||
}()
|
||||
})
|
||||
|
||||
operation := func() error {
|
||||
aws, err := p.createClient()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue