mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
debug: introduce support for configuring client connect WRITE deadline (#19170)
just like client-conn-read-deadline, added a new flag that does client-conn-write-deadline as well. Both are not configured by default, since we do not yet know what is the right value. Allow this to be configurable if needed.
This commit is contained in:
@@ -79,7 +79,8 @@ func (listener *httpListener) Accept() (conn net.Conn, err error) {
|
||||
case result, ok := <-listener.acceptCh:
|
||||
if ok {
|
||||
return deadlineconn.New(result.conn).
|
||||
WithReadDeadline(listener.opts.ClientReadTimeout), result.err
|
||||
WithReadDeadline(listener.opts.ClientReadTimeout).
|
||||
WithWriteDeadline(listener.opts.ClientWriteTimeout), result.err
|
||||
}
|
||||
case <-listener.ctx.Done():
|
||||
}
|
||||
@@ -124,10 +125,11 @@ func (listener *httpListener) Addrs() (addrs []net.Addr) {
|
||||
|
||||
// TCPOptions specify customizable TCP optimizations on raw socket
|
||||
type TCPOptions struct {
|
||||
UserTimeout int // this value is expected to be in milliseconds
|
||||
ClientReadTimeout time.Duration // When the net.Conn is idle for more than ReadTimeout duration, we close the connection on the client proactively.
|
||||
Interface string // this is a VRF device passed via `--interface` flag
|
||||
Trace func(msg string) // Trace when starting.
|
||||
UserTimeout int // this value is expected to be in milliseconds
|
||||
ClientReadTimeout time.Duration // When the net.Conn is idle for more than ReadTimeout duration, we close the connection on the client proactively.
|
||||
ClientWriteTimeout time.Duration // When the net.Conn is idle for more than WriteTimeout duration, we close the connection on the client proactively.
|
||||
Interface string // this is a VRF device passed via `--interface` flag
|
||||
Trace func(msg string) // Trace when starting.
|
||||
}
|
||||
|
||||
// newHTTPListener - creates new httpListener object which is interface compatible to net.Listener.
|
||||
|
||||
Reference in New Issue
Block a user