ref: 6f3716dc22e373097a38d053f5415feca602f330
parent: 5a52cd5f920bb3d067ab1682adece9f813c67ba1
author: Bjørn Erik Pedersen <[email protected]>
date: Mon Oct 22 15:50:27 EDT 2018
commands: Avoid panic in error handler on config errors
--- a/commands/server.go
+++ b/commands/server.go
@@ -334,7 +334,11 @@
if err != nil {
f.c.logger.ERROR.Println(err)
}
- fmt.Fprint(w, injectLiveReloadScript(&b, f.c.Cfg.GetInt("liveReloadPort")))
+ port = 1313
+ if !f.c.paused {
+ port = f.c.Cfg.GetInt("liveReloadPort")
+ }
+ fmt.Fprint(w, injectLiveReloadScript(&b, port))
return
}