From a703f229970cd55c432c53406927226090842eea Mon Sep 17 00:00:00 2001 From: "Jonathan Leibiusky @xetorthio" Date: Fri, 19 May 2017 10:16:00 -0300 Subject: [PATCH] Fixes #145 --- handlers/home.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/handlers/home.go b/handlers/home.go index 6731098..d03d521 100644 --- a/handlers/home.go +++ b/handlers/home.go @@ -12,6 +12,12 @@ func Home(w http.ResponseWriter, r *http.Request) { sessionId := vars["sessionId"] s := services.GetSession(sessionId) + if s == nil { + // Session doesn't exist (can happen if closing the sessions an reloading the page, or similar). + w.WriteHeader(http.StatusNotFound) + return + } + if s.Stack != "" { go s.DeployStack() }