⚡ Set write timeout to 500ms as Firefox recommends
/ docker (push) Successful in 1m3s
Details
/ docker (push) Successful in 1m3s
Details
This commit is contained in:
parent
aaba6edc39
commit
353704a09d
6
main.go
6
main.go
|
@ -12,6 +12,7 @@ import (
|
|||
"runtime"
|
||||
"runtime/pprof"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/caarlos0/env/v10"
|
||||
|
||||
|
@ -45,8 +46,9 @@ func main() {
|
|||
Handler: http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
|
||||
fmt.Fprintln(w, "hello, world!")
|
||||
}),
|
||||
ErrorLog: logger,
|
||||
BaseContext: func(ln net.Listener) context.Context { return ctx },
|
||||
ErrorLog: logger,
|
||||
BaseContext: func(ln net.Listener) context.Context { return ctx },
|
||||
WriteTimeout: 500 * time.Millisecond,
|
||||
}
|
||||
|
||||
done := make(chan os.Signal, 1)
|
||||
|
|
Loading…
Reference in New Issue