Skip to content

Commit

Permalink
cmd/server: resolve gorilla session mem leak - closes #461
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Jun 1, 2017
1 parent 8acf0f9 commit e035e7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/server/handler.go
Expand Up @@ -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) {
Expand Down Expand Up @@ -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)},
},
Expand Down

0 comments on commit e035e7b

Please sign in to comment.