/tls/configure -- don't close https connection mid-request when configuration removes ports and certificates
This commit is contained in:
parent
2814c393ad
commit
12f8590228
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue