From 27ff6aeccb99995880a86ee482dd90c1e5c85d85 Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Wed, 27 Mar 2019 12:36:30 -0600 Subject: Fix goroutine leak in Run D'oh, the servers' Shutdown() would never be called because they were never added to the list of servers. Thanks Danny for finding this. --- modules/caddyhttp/caddyhttp.go | 1 + 1 file changed, 1 insertion(+) (limited to 'modules') diff --git a/modules/caddyhttp/caddyhttp.go b/modules/caddyhttp/caddyhttp.go index ec2637a..529c1f7 100644 --- a/modules/caddyhttp/caddyhttp.go +++ b/modules/caddyhttp/caddyhttp.go @@ -49,6 +49,7 @@ func (hc *httpModuleConfig) Run() error { return fmt.Errorf("%s: listening on %s: %v", proto, addr, err) } go s.Serve(ln) + hc.servers = append(hc.servers, s) } } } -- cgit v1.2.3