From 1eba924cb98c6b15fd5af63856c5e031d555e15d Mon Sep 17 00:00:00 2001 From: Jonas Falck Date: Wed, 3 Mar 2021 16:22:51 +0100 Subject: [PATCH] Fix Transport leak with multiple reverseproxies being created --- discovery.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/discovery.go b/discovery.go index 614467b..f653c9a 100644 --- a/discovery.go +++ b/discovery.go @@ -83,6 +83,9 @@ func startDiscovery(ctx context.Context, cfg *config) { func runDiscovery(ctx context.Context, cfg *config) { ip := cfg.Discovery.Address for name, exp := range cfg.Discovery.Exporters { + if m := cfg.getModule(name); m != nil { + continue + } if alive(ctx, ip, exp.Port, exp.Path) { mc := &moduleConfig{ Method: "http",