From e6c599461d1ee9e2f013e666d26ef1fdc121d945 Mon Sep 17 00:00:00 2001 From: Naitik Shah Date: Mon, 25 Mar 2013 14:59:40 -0700 Subject: [PATCH] return on error --- gracedemo/demo.go | 1 + 1 file changed, 1 insertion(+) diff --git a/gracedemo/demo.go b/gracedemo/demo.go index 80ca412..b85985b 100644 --- a/gracedemo/demo.go +++ b/gracedemo/demo.go @@ -33,6 +33,7 @@ func newHandler(name string) http.Handler { duration, err := time.ParseDuration(r.FormValue("duration")) if err != nil { http.Error(w, err.Error(), 400) + return } time.Sleep(duration) fmt.Fprintf(