lets-go:10.6 timeouts
This commit is contained in:
parent
5d582a5971
commit
7479313ee8
@ -73,10 +73,13 @@ func main() {
|
||||
}
|
||||
|
||||
srv := &http.Server{
|
||||
Addr: *addr,
|
||||
Handler: app.routes(),
|
||||
ErrorLog: slog.NewLogLogger(logger.Handler(), slog.LevelError),
|
||||
TLSConfig: tlsConfig,
|
||||
Addr: *addr,
|
||||
Handler: app.routes(),
|
||||
ErrorLog: slog.NewLogLogger(logger.Handler(), slog.LevelError),
|
||||
TLSConfig: tlsConfig,
|
||||
IdleTimeout: time.Minute,
|
||||
ReadTimeout: 5 * time.Second,
|
||||
WriteTimeout: 10 * time.Second,
|
||||
}
|
||||
|
||||
logger.Info("starting server", slog.String("addr", srv.Addr))
|
||||
|
Loading…
Reference in New Issue
Block a user