mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
fix aggressive expiration detection (#11446)
for some flaky networks this may be too fast of a value choose a defensive value, and let this be addressed properly in a new refactor of dsync with renewal logic. Also enable faster fallback delay to cater for misconfigured IPv6 servers refer - https://golang.org/pkg/net/#Dialer - https://tools.ietf.org/html/rfc6555
This commit is contained in:
@@ -44,7 +44,9 @@ func DialContextWithDNSCache(cache *DNSCache, baseDialCtx DialContext) DialConte
|
||||
baseDialCtx = (&net.Dialer{
|
||||
Timeout: 30 * time.Second,
|
||||
KeepAlive: 30 * time.Second,
|
||||
DualStack: true,
|
||||
// If zero, Go defaults to '300ms', we will default to 100ms instead.
|
||||
// https://tools.ietf.org/html/rfc6555
|
||||
FallbackDelay: 100 * time.Millisecond,
|
||||
}).DialContext
|
||||
}
|
||||
return func(ctx context.Context, network, host string) (net.Conn, error) {
|
||||
|
||||
@@ -68,6 +68,9 @@ func NewInternodeDialContext(dialTimeout time.Duration) DialContext {
|
||||
return func(ctx context.Context, network, addr string) (net.Conn, error) {
|
||||
dialer := &net.Dialer{
|
||||
Timeout: dialTimeout,
|
||||
// If zero, Go defaults to '300ms', we will default to 100ms instead.
|
||||
// https://tools.ietf.org/html/rfc6555
|
||||
FallbackDelay: 100 * time.Millisecond,
|
||||
Control: func(network, address string, c syscall.RawConn) error {
|
||||
return setInternalTCPParameters(c)
|
||||
},
|
||||
@@ -81,6 +84,9 @@ func NewCustomDialContext(dialTimeout time.Duration) DialContext {
|
||||
return func(ctx context.Context, network, addr string) (net.Conn, error) {
|
||||
dialer := &net.Dialer{
|
||||
Timeout: dialTimeout,
|
||||
// If zero, Go defaults to '300ms', we will default to 100ms instead.
|
||||
// https://tools.ietf.org/html/rfc6555
|
||||
FallbackDelay: 100 * time.Millisecond,
|
||||
Control: func(network, address string, c syscall.RawConn) error {
|
||||
return c.Control(func(fdPtr uintptr) {
|
||||
// got socket file descriptor to set parameters.
|
||||
|
||||
Reference in New Issue
Block a user