mirror of
https://github.com/zix99/traefik-lazyload.git
synced 2025-12-21 21:33:09 +01:00
Merge pull request #2 from julianboehne/master
fix: race condition on stopping containers
This commit is contained in:
@@ -203,7 +203,9 @@ func (s *Core) stopDependenciesFor(ctx context.Context, cid string, cts *Contain
|
|||||||
for _, ct := range containers {
|
for _, ct := range containers {
|
||||||
if ct.IsRunning() {
|
if ct.IsRunning() {
|
||||||
logrus.Infof("Stopping %s...", ct.NameID())
|
logrus.Infof("Stopping %s...", ct.NameID())
|
||||||
go s.client.ContainerStop(ctx, ct.ID, container.StopOptions{})
|
if err := s.client.ContainerStop(ctx, ct.ID, container.StopOptions{}); err != nil {
|
||||||
|
logrus.Warnf("Error stopping %s: %v", ct.NameID(), err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user