Skip to content

Commit 9ea2efc

Browse files
committed
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.
1 parent b54c139 commit 9ea2efc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

aperture.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,9 +379,9 @@ func (a *Aperture) Start(errChan chan error) error {
379379
a.httpsServer = &http.Server{
380380
Addr: a.cfg.ListenAddr,
381381
Handler: handler,
382-
IdleTimeout: 0,
383-
ReadTimeout: 0,
384-
WriteTimeout: 0,
382+
IdleTimeout: time.Minute * 2,
383+
ReadTimeout: time.Second * 15,
384+
WriteTimeout: time.Second * 30,
385385
}
386386

387387
// Create TLS configuration by either creating new self-signed certs or

0 commit comments

Comments
 (0)