From 4440c9ee9d76868dc34947649449a7fa8bc35cc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Matczuk?= Date: Fri, 6 Dec 2024 15:46:17 +0100 Subject: [PATCH] chore(net): move defaultKeepAliveConfig() --- net.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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 {