refactor: add Safe everywhere is needing.
This commit is contained in:
parent
3174fb8861
commit
c36e0b3b06
8 changed files with 30 additions and 19 deletions
|
@ -112,7 +112,9 @@ func (p *Provider) longPoll(client rancher.Client, updateConfiguration func(stri
|
|||
// Holds the connection until there is either a change in the metadata
|
||||
// repository or `p.RefreshSeconds` has elapsed. Long polling should be
|
||||
// favoured for the most accurate configuration updates.
|
||||
go client.OnChange(p.RefreshSeconds, updateConfiguration)
|
||||
safe.Go(func() {
|
||||
client.OnChange(p.RefreshSeconds, updateConfiguration)
|
||||
})
|
||||
<-stop
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue