Set write timeout to 500ms as Firefox recommends
All checks were successful
/ docker (push) Successful in 1m3s

This commit is contained in:
Maxim Lebedev 2023-11-08 02:34:30 +06:00
parent aaba6edc39
commit 353704a09d
Signed by: toby3d
GPG Key ID: 1F14E25B7C119FC5

View File

@ -12,6 +12,7 @@ import (
"runtime" "runtime"
"runtime/pprof" "runtime/pprof"
"syscall" "syscall"
"time"
"github.com/caarlos0/env/v10" "github.com/caarlos0/env/v10"
@ -47,6 +48,7 @@ func main() {
}), }),
ErrorLog: logger, ErrorLog: logger,
BaseContext: func(ln net.Listener) context.Context { return ctx }, BaseContext: func(ln net.Listener) context.Context { return ctx },
WriteTimeout: 500 * time.Millisecond,
} }
done := make(chan os.Signal, 1) done := make(chan os.Signal, 1)