1
0
mirror of https://github.com/containous/traefik.git synced 2025-10-16 23:33:20 +03:00

refactor: add Safe everywhere is needing.

This commit is contained in:
Fernandez Ludovic
2017-07-19 14:11:45 +02:00
committed by Ludovic Fernandez
parent 3174fb8861
commit c36e0b3b06
8 changed files with 30 additions and 19 deletions

View File

@@ -80,7 +80,7 @@ func (d *Datastore) watchChanges() error {
if err != nil {
return err
}
go func() {
safe.Go(func() {
ctx, cancel := context.WithCancel(d.ctx)
operation := func() error {
for {
@@ -113,7 +113,7 @@ func (d *Datastore) watchChanges() error {
if err != nil {
log.Errorf("Error in watch datastore: %v", err)
}
}()
})
return nil
}