mirror of
https://github.com/1f349/violet.git
synced 2024-11-21 19:01:39 +00:00
Disable keep alives
This commit is contained in:
parent
0dab17ea85
commit
f1a2ce0896
@ -143,16 +143,19 @@ func normalLoad(startUp startUpConfig, wd string) {
|
|||||||
var srvApi, srvHttp, srvHttps *http.Server
|
var srvApi, srvHttp, srvHttps *http.Server
|
||||||
if srvConf.ApiListen != "" {
|
if srvConf.ApiListen != "" {
|
||||||
srvApi = api.NewApiServer(srvConf, allCompilables)
|
srvApi = api.NewApiServer(srvConf, allCompilables)
|
||||||
|
srvApi.SetKeepAlivesEnabled(false)
|
||||||
log.Printf("[API] Starting API server on: '%s'\n", srvApi.Addr)
|
log.Printf("[API] Starting API server on: '%s'\n", srvApi.Addr)
|
||||||
go utils.RunBackgroundHttp("API", srvApi)
|
go utils.RunBackgroundHttp("API", srvApi)
|
||||||
}
|
}
|
||||||
if srvConf.HttpListen != "" {
|
if srvConf.HttpListen != "" {
|
||||||
srvHttp = servers.NewHttpServer(srvConf)
|
srvHttp = servers.NewHttpServer(srvConf)
|
||||||
|
srvHttp.SetKeepAlivesEnabled(false)
|
||||||
log.Printf("[HTTP] Starting HTTP server on: '%s'\n", srvHttp.Addr)
|
log.Printf("[HTTP] Starting HTTP server on: '%s'\n", srvHttp.Addr)
|
||||||
go utils.RunBackgroundHttp("HTTP", srvHttp)
|
go utils.RunBackgroundHttp("HTTP", srvHttp)
|
||||||
}
|
}
|
||||||
if srvConf.HttpsListen != "" {
|
if srvConf.HttpsListen != "" {
|
||||||
srvHttps = servers.NewHttpsServer(srvConf)
|
srvHttps = servers.NewHttpsServer(srvConf)
|
||||||
|
srvHttps.SetKeepAlivesEnabled(false)
|
||||||
log.Printf("[HTTPS] Starting HTTPS server on: '%s'\n", srvHttps.Addr)
|
log.Printf("[HTTPS] Starting HTTPS server on: '%s'\n", srvHttps.Addr)
|
||||||
go utils.RunBackgroundHttps("HTTPS", srvHttps)
|
go utils.RunBackgroundHttps("HTTPS", srvHttps)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user