Set more generous timeouts. Why not? I am feeling generous.
This commit is contained in:
parent
1362c2755d
commit
59bd796233
@ -95,9 +95,9 @@ var startCmd = &cobra.Command{
|
|||||||
server := http.Server{
|
server := http.Server{
|
||||||
Addr: ":" + port,
|
Addr: ":" + port,
|
||||||
Handler: stack(httpRequestRouter),
|
Handler: stack(httpRequestRouter),
|
||||||
ReadTimeout: 2 * time.Second,
|
ReadTimeout: 4 * time.Second,
|
||||||
WriteTimeout: 4 * time.Second,
|
WriteTimeout: 8 * time.Second,
|
||||||
IdleTimeout: 8 * time.Second,
|
IdleTimeout: 16 * time.Second,
|
||||||
MaxHeaderBytes: 1024 * 1024, // 1MB
|
MaxHeaderBytes: 1024 * 1024, // 1MB
|
||||||
BaseContext: func(_ net.Listener) context.Context { return ctx }, // Pass base context to all requests
|
BaseContext: func(_ net.Listener) context.Context { return ctx }, // Pass base context to all requests
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user