From 96a346879132939d5561496723251c9208f89b2d Mon Sep 17 00:00:00 2001 From: Harold Ozouf Date: Mon, 1 Feb 2021 12:36:03 +0100 Subject: [PATCH] Fix servers transport not found --- pkg/provider/aggregator/aggregator.go | 8 ++++---- pkg/provider/aggregator/aggregator_test.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/provider/aggregator/aggregator.go b/pkg/provider/aggregator/aggregator.go index 38410f0a8..d000fa8af 100644 --- a/pkg/provider/aggregator/aggregator.go +++ b/pkg/provider/aggregator/aggregator.go @@ -119,14 +119,14 @@ func (p ProviderAggregator) Init() error { // Provide calls the provide method of every providers. func (p ProviderAggregator) Provide(configurationChan chan<- dynamic.Message, pool *safe.Pool) error { - if p.fileProvider != nil { - launchProvider(configurationChan, pool, p.fileProvider) - } - if p.internalProvider != nil { launchProvider(configurationChan, pool, p.internalProvider) } + if p.fileProvider != nil { + launchProvider(configurationChan, pool, p.fileProvider) + } + for _, prd := range p.providers { prd := prd safe.Go(func() { diff --git a/pkg/provider/aggregator/aggregator_test.go b/pkg/provider/aggregator/aggregator_test.go index 1613ac193..8aebf6854 100644 --- a/pkg/provider/aggregator/aggregator_test.go +++ b/pkg/provider/aggregator/aggregator_test.go @@ -33,8 +33,8 @@ func TestProviderAggregator_Provide(t *testing.T) { }() // Make sure the file provider is always called first, followed by the internal provider. - requireReceivedMessageFromProviders(t, cfgCh, []string{"file"}) requireReceivedMessageFromProviders(t, cfgCh, []string{"internal"}) + requireReceivedMessageFromProviders(t, cfgCh, []string{"file"}) // Check if all providers have been called, the order doesn't matter. requireReceivedMessageFromProviders(t, cfgCh, []string{"salad", "tomato", "onion"})