Fix panic when https server is not running
This commit is contained in:
parent
b4b800565c
commit
8da90a7f4a
|
@ -1086,7 +1086,7 @@ func handleTLSConfigure(w http.ResponseWriter, r *http.Request) {
|
||||||
httpUpdateConfigReloadDNSReturnOK(w, r)
|
httpUpdateConfigReloadDNSReturnOK(w, r)
|
||||||
// this needs to be done in a goroutine because Shutdown() is a blocking call, and it will block
|
// 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
|
// until all requests are finished, and _we_ are inside a request right now, so it will block indefinitely
|
||||||
if restartHTTPS {
|
if restartHTTPS && httpsServer.server != nil {
|
||||||
go func() {
|
go func() {
|
||||||
httpsServer.cond.Broadcast()
|
httpsServer.cond.Broadcast()
|
||||||
httpsServer.server.Shutdown(context.TODO())
|
httpsServer.server.Shutdown(context.TODO())
|
||||||
|
|
Loading…
Reference in New Issue