Skip to content

Commit

Permalink
aperture: start setting default values for the http timeout configs
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Roasbeef committed Nov 17, 2023
1 parent 9fbaa19 commit 02d5294
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions aperture.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,9 +381,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
Expand Down

0 comments on commit 02d5294

Please sign in to comment.