diff options
Diffstat (limited to 'api/server.go')
-rw-r--r-- | api/server.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/api/server.go b/api/server.go index b84066cbe..6e0ca49f0 100644 --- a/api/server.go +++ b/api/server.go @@ -6,6 +6,7 @@ package api import ( l4g "github.com/alecthomas/log4go" "github.com/braintree/manners" + "github.com/gorilla/handlers" "github.com/gorilla/mux" "github.com/mattermost/platform/store" "github.com/mattermost/platform/utils" @@ -73,11 +74,10 @@ func StartServer() { } go func() { - err := manners.ListenAndServe(utils.Cfg.ServiceSettings.ListenAddress, handler) + err := manners.ListenAndServe(utils.Cfg.ServiceSettings.ListenAddress, handlers.RecoveryHandler(handlers.PrintRecoveryStack(true))(handler)) if err != nil { l4g.Critical(utils.T("api.server.start_server.starting.critical"), err) time.Sleep(time.Second) - panic(utils.T("api.server.start_server.starting.panic") + err.Error()) } }() } |