Increase write timeout to prevent forcibly closing connections.

This commit is contained in:
Kavin 2022-04-18 09:33:19 +01:00
parent 696c07b8c7
commit d759617d1f
No known key found for this signature in database
GPG key ID: 49451E4482CC5BCD

View file

@ -263,7 +263,7 @@ func main() {
listener, err := net.Listen("unix", socket)
srv := &http.Server{
ReadTimeout: 5 * time.Second,
WriteTimeout: 10 * time.Second,
WriteTimeout: 1 * time.Hour,
Addr: ":8080",
Handler: &requesthandler{},
}