aperture: start setting default values for the http timeout configs

In this commit, we start to set default values for the HTTP timeout
config values. Otherwise, it's possible that TCP connections will never
be closed, causing them to stack up over time, eventually consuming a
lot of memory.
This commit is contained in:
Olaoluwa Osuntokun
2023-11-16 16:37:12 -08:00
parent b54c1396f0
commit 9ea2efc3bd

View File

@@ -379,9 +379,9 @@ func (a *Aperture) Start(errChan chan error) error {
a.httpsServer = &http.Server{
Addr: a.cfg.ListenAddr,
Handler: handler,
IdleTimeout: 0,
ReadTimeout: 0,
WriteTimeout: 0,
IdleTimeout: time.Minute * 2,
ReadTimeout: time.Second * 15,
WriteTimeout: time.Second * 30,
}
// Create TLS configuration by either creating new self-signed certs or