Skip to content

Commit 1e537fc

Browse files
authored
fix: increase TCP dial timeout default value to improve connection reliability
1 parent cf2eb44 commit 1e537fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ var (
6464
semaphoreLimit = getEnvAsInt("NP_SEMAPHORE_LIMIT", 1024) // 信号量限制
6565
udpDataBufSize = getEnvAsInt("NP_UDP_DATA_BUF_SIZE", 8192) // UDP缓冲区大小
6666
handshakeTimeout = getEnvAsDuration("NP_HANDSHAKE_TIMEOUT", 10*time.Second) // 握手超时
67-
tcpDialTimeout = getEnvAsDuration("NP_TCP_DIAL_TIMEOUT", 10*time.Second) // TCP拨号超时
67+
tcpDialTimeout = getEnvAsDuration("NP_TCP_DIAL_TIMEOUT", 30*time.Second) // TCP拨号超时
6868
udpDialTimeout = getEnvAsDuration("NP_UDP_DIAL_TIMEOUT", 10*time.Second) // UDP拨号超时
6969
poolGetTimeout = getEnvAsDuration("NP_POOL_GET_TIMEOUT", 30*time.Second) // 池连接获取超时
7070
minPoolInterval = getEnvAsDuration("NP_MIN_POOL_INTERVAL", 100*time.Millisecond) // 最小池间隔

0 commit comments

Comments
 (0)