From f1a2ce0896daaa6bfdee8f604eae23df43f49e38 Mon Sep 17 00:00:00 2001 From: MrMelon54 Date: Wed, 30 Aug 2023 12:02:54 +0100 Subject: [PATCH] Disable keep alives --- cmd/violet/serve.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/violet/serve.go b/cmd/violet/serve.go index bd2cc49..1aec31f 100644 --- a/cmd/violet/serve.go +++ b/cmd/violet/serve.go @@ -143,16 +143,19 @@ func normalLoad(startUp startUpConfig, wd string) { var srvApi, srvHttp, srvHttps *http.Server if srvConf.ApiListen != "" { srvApi = api.NewApiServer(srvConf, allCompilables) + srvApi.SetKeepAlivesEnabled(false) log.Printf("[API] Starting API server on: '%s'\n", srvApi.Addr) go utils.RunBackgroundHttp("API", srvApi) } if srvConf.HttpListen != "" { srvHttp = servers.NewHttpServer(srvConf) + srvHttp.SetKeepAlivesEnabled(false) log.Printf("[HTTP] Starting HTTP server on: '%s'\n", srvHttp.Addr) go utils.RunBackgroundHttp("HTTP", srvHttp) } if srvConf.HttpsListen != "" { srvHttps = servers.NewHttpsServer(srvConf) + srvHttps.SetKeepAlivesEnabled(false) log.Printf("[HTTPS] Starting HTTPS server on: '%s'\n", srvHttps.Addr) go utils.RunBackgroundHttps("HTTPS", srvHttps) }