* refactor

1. Auth module was initialized inside dns.go - now it's moved to initWeb()

2. stopHTTPServer() wasn't called on server stop - now we do that

3. Don't use postInstall() HTTP filter where it's not necessary.
Now we register handlers after installation is complete.
This commit is contained in:
Simon Zolin
2020-02-18 19:27:09 +03:00
parent c77907694d
commit e8129f15c7
7 changed files with 75 additions and 36 deletions

View File

@@ -356,6 +356,8 @@ func handleInstallConfigure(w http.ResponseWriter, r *http.Request) {
return
}
registerControlHandlers()
// this needs to be done in a goroutine because Shutdown() is a blocking call, and it will block
// until all requests are finished, and _we_ are inside a request right now, so it will block indefinitely
if restartHTTP {