mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-16 18:10:28 +08:00
健康检查失败时,会自动尝试再次连接
This commit is contained in:
@@ -185,7 +185,11 @@ func (this *HealthCheckExecutor) checkNode(healthCheckConfig *serverconfigs.Heal
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return net.Dial(network, result.NodeAddr+":"+port)
|
||||
conn, err := net.Dial(network, result.NodeAddr+":"+port)
|
||||
if err == nil {
|
||||
return conn, nil
|
||||
}
|
||||
return net.DialTimeout(network, result.NodeAddr+":"+port, timeout)
|
||||
},
|
||||
MaxIdleConns: 1,
|
||||
MaxIdleConnsPerHost: 1,
|
||||
|
||||
Reference in New Issue
Block a user