From e035e7b1e656ccfc1b2eed983266e446343b1ebf Mon Sep 17 00:00:00 2001 From: aeneasr Date: Thu, 1 Jun 2017 14:33:53 +0200 Subject: [PATCH] cmd/server: resolve gorilla session mem leak - closes #461 --- cmd/server/handler.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/server/handler.go b/cmd/server/handler.go index 3e4113959a..45b11727f6 100644 --- a/cmd/server/handler.go +++ b/cmd/server/handler.go @@ -21,6 +21,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/urfave/negroni" + "github.com/gorilla/context" ) func RunHost(c *config.Config) func(cmd *cobra.Command, args []string) { @@ -59,7 +60,7 @@ func RunHost(c *config.Config) func(cmd *cobra.Command, args []string) { var srv = graceful.WithDefaults(&http.Server{ Addr: c.GetAddress(), - Handler: n, + Handler: context.ClearHandler(n), TLSConfig: &tls.Config{ Certificates: []tls.Certificate{getOrCreateTLSCertificate(cmd, c)}, },