Skip to content

Commit 4440c9e

Browse files
committed
chore(net): move defaultKeepAliveConfig()
1 parent 7568045 commit 4440c9e

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

net.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,6 @@ func DialRedirectFromHostPortPairs(subs []HostPortPair) DialRedirectFunc {
4747
}
4848
}
4949

50-
// defaultKeepAliveConfig returns configuration that enables keep-alive pings with OS-specific parameters.
51-
func defaultKeepAliveConfig() net.KeepAliveConfig {
52-
return net.KeepAliveConfig{
53-
Enable: true,
54-
Idle: -1,
55-
Interval: -1,
56-
Count: -1,
57-
}
58-
}
59-
6050
type DialRetryConfig struct {
6151
Attempts int
6252
Backoff time.Duration
@@ -94,6 +84,16 @@ func DefaultDialConfig() *DialConfig {
9484
}
9585
}
9686

87+
// defaultKeepAliveConfig returns configuration that enables keep-alive pings with OS-specific parameters.
88+
func defaultKeepAliveConfig() net.KeepAliveConfig {
89+
return net.KeepAliveConfig{
90+
Enable: true,
91+
Idle: -1,
92+
Interval: -1,
93+
Count: -1,
94+
}
95+
}
96+
9797
type dialContextFunc func(ctx context.Context, network, address string) (net.Conn, error)
9898

9999
type Dialer struct {

0 commit comments

Comments
 (0)