mirror of
https://github.com/minio/minio.git
synced 2025-01-23 20:53:18 -05:00
Adding read nad write timeout for unresponsive client connectinos (#1809)
This commit is contained in:
parent
2e4ab71303
commit
1947ae198e
@ -26,6 +26,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/minio/cli"
|
"github.com/minio/cli"
|
||||||
"github.com/minio/mc/pkg/console"
|
"github.com/minio/mc/pkg/console"
|
||||||
@ -79,7 +80,10 @@ type serverCmdConfig struct {
|
|||||||
func configureServer(srvCmdConfig serverCmdConfig) *http.Server {
|
func configureServer(srvCmdConfig serverCmdConfig) *http.Server {
|
||||||
// Minio server config
|
// Minio server config
|
||||||
apiServer := &http.Server{
|
apiServer := &http.Server{
|
||||||
Addr: srvCmdConfig.serverAddr,
|
Addr: srvCmdConfig.serverAddr,
|
||||||
|
// Adding timeout of 10 minutes for unresponsive client connections.
|
||||||
|
ReadTimeout: 600 * time.Second,
|
||||||
|
WriteTimeout: 600 * time.Second,
|
||||||
Handler: configureServerHandler(srvCmdConfig),
|
Handler: configureServerHandler(srvCmdConfig),
|
||||||
MaxHeaderBytes: 1 << 20,
|
MaxHeaderBytes: 1 << 20,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user