diff --git a/net.go b/net.go index 834b032b..72ffec64 100644 --- a/net.go +++ b/net.go @@ -47,16 +47,6 @@ func DialRedirectFromHostPortPairs(subs []HostPortPair) DialRedirectFunc { } } -// defaultKeepAliveConfig returns configuration that enables keep-alive pings with OS-specific parameters. -func defaultKeepAliveConfig() net.KeepAliveConfig { - return net.KeepAliveConfig{ - Enable: true, - Idle: -1, - Interval: -1, - Count: -1, - } -} - type DialRetryConfig struct { Attempts int Backoff time.Duration @@ -94,6 +84,16 @@ func DefaultDialConfig() *DialConfig { } } +// defaultKeepAliveConfig returns configuration that enables keep-alive pings with OS-specific parameters. +func defaultKeepAliveConfig() net.KeepAliveConfig { + return net.KeepAliveConfig{ + Enable: true, + Idle: -1, + Interval: -1, + Count: -1, + } +} + type dialContextFunc func(ctx context.Context, network, address string) (net.Conn, error) type Dialer struct {