Merge: - web: install: couldn't apply new HTTP port until the restart

Squashed commit of the following:

commit 2480dcbe2390601ab4e423241eb306127e4b6d26
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Wed Apr 8 19:05:06 2020 +0300

    - web: install: couldn't apply new HTTP port until the restart
This commit is contained in:
Simon Zolin 2020-04-08 19:08:35 +03:00
parent 8911a38f43
commit 321b1a7e9c
1 changed files with 4 additions and 0 deletions

View File

@ -345,6 +345,10 @@ func (web *Web) handleInstallConfigure(w http.ResponseWriter, r *http.Request) {
return
}
web.conf.firstRun = false
web.conf.BindHost = newSettings.Web.IP
web.conf.BindPort = newSettings.Web.Port
registerControlHandlers()
// this needs to be done in a goroutine because Shutdown() is a blocking call, and it will block