return on error
This commit is contained in:
parent
07af98f40b
commit
e6c599461d
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user