summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-03-27 12:36:30 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2019-03-27 12:36:30 -0600
commit27ff6aeccb99995880a86ee482dd90c1e5c85d85 (patch)
treecbdca5162a3cba8a029ca6d1c53aa470274f94e4 /modules
parenta8dc73b4d9db5edf85e78314c9759b9d12a79b71 (diff)
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.
Diffstat (limited to 'modules')
-rw-r--r--modules/caddyhttp/caddyhttp.go1
1 files changed, 1 insertions, 0 deletions
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)
}
}
}