diff --git a/control.go b/control.go index bd7b673c..cc82abab 100644 --- a/control.go +++ b/control.go @@ -1086,7 +1086,7 @@ func handleTLSConfigure(w http.ResponseWriter, r *http.Request) { httpUpdateConfigReloadDNSReturnOK(w, r) // 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 restartHTTPS { + if restartHTTPS && httpsServer.server != nil { go func() { httpsServer.cond.Broadcast() httpsServer.server.Shutdown(context.TODO())