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"
|
||||
"strings"
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/mc/pkg/console"
|
||||
@ -80,6 +81,9 @@ func configureServer(srvCmdConfig serverCmdConfig) *http.Server {
|
||||
// Minio server config
|
||||
apiServer := &http.Server{
|
||||
Addr: srvCmdConfig.serverAddr,
|
||||
// Adding timeout of 10 minutes for unresponsive client connections.
|
||||
ReadTimeout: 600 * time.Second,
|
||||
WriteTimeout: 600 * time.Second,
|
||||
Handler: configureServerHandler(srvCmdConfig),
|
||||
MaxHeaderBytes: 1 << 20,
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user