diff --git a/control.go b/control.go index a87bd2cd..8c2fa789 100644 --- a/control.go +++ b/control.go @@ -1104,6 +1104,7 @@ func handleTLSConfigure(w http.ResponseWriter, r *http.Request) { // until all requests are finished, and _we_ are inside a request right now, so it will block indefinitely if restartHTTPS { go func() { + time.Sleep(time.Second) // TODO: could not find a way to reliably know that data was fully sent to client by https server, so we wait a bit to let response through before closing the server httpsServer.cond.Broadcast() if httpsServer.server != nil { httpsServer.server.Shutdown(context.TODO())