homeContext refactoring

This commit is contained in:
Andrey Meshkov
2020-09-08 15:16:36 +03:00
parent 06594bde8f
commit cc1060d428
10 changed files with 255 additions and 241 deletions

View File

@@ -144,7 +144,7 @@ func (web *Web) Start() {
}
err := web.httpServer.ListenAndServe()
if err != http.ErrServerClosed {
cleanupAlways()
Context.cleanupAlways()
log.Fatal(err)
}
// We use ErrServerClosed as a sign that we need to rebind on new address, so go back to the start of the loop
@@ -202,7 +202,7 @@ func (web *Web) tlsServerLoop() {
printHTTPAddresses("https")
err := web.httpsServer.server.ListenAndServeTLS("", "")
if err != http.ErrServerClosed {
cleanupAlways()
Context.cleanupAlways()
log.Fatal(err)
}
}