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 20, 2023
1 parent b54c139 commit 9ea2efc
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 @@ -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
Expand Down

0 comments on commit 9ea2efc

Please sign in to comment.