diff --git a/examples/compose-marathon.yml b/examples/compose-marathon.yml index e0be6a038..7239cba8f 100644 --- a/examples/compose-marathon.yml +++ b/examples/compose-marathon.yml @@ -43,7 +43,7 @@ marathon: command: --event_subscriber http_callback traefik: - image: traefik + image: containous/traefik command: -c /dev/null --web --logLevel=DEBUG --marathon --marathon.domain marathon.localhost --marathon.endpoint http://172.17.0.1:8080 --marathon.watch ports: - "8000:80" diff --git a/provider/marathon.go b/provider/marathon.go index 1f8b07599..64f8b2e9f 100644 --- a/provider/marathon.go +++ b/provider/marathon.go @@ -69,6 +69,7 @@ func (provider *Marathon) Provide(configurationChan chan<- types.ConfigMessage, return err } pool.Go(func(stop chan bool) { + defer close(update) for { select { case <-stop: @@ -86,6 +87,11 @@ func (provider *Marathon) Provide(configurationChan chan<- types.ConfigMessage, } }) } + configuration := provider.loadMarathonConfig() + configurationChan <- types.ConfigMessage{ + ProviderName: "marathon", + Configuration: configuration, + } return nil }