Skip to content

Commit

Permalink
feat: add connection timeouts to the http server
Browse files Browse the repository at this point in the history
Signed-off-by: Vishal Choudhary <[email protected]>
  • Loading branch information
vishal-chdhry committed Jan 21, 2025
1 parent 9e023c8 commit 2cade33
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,13 @@ func main() {
},
}
srv := &http.Server{
Addr: ":9443",
Handler: mux,
TLSConfig: tlsConf,
Addr: ":9443",
Handler: mux,
TLSConfig: tlsConf,
ReadTimeout: 30 * time.Second,
WriteTimeout: 30 * time.Second,
ReadHeaderTimeout: 30 * time.Second,
IdleTimeout: 1 * time.Minute,
}

go func() {
Expand Down

0 comments on commit 2cade33

Please sign in to comment.