mirror of
https://github.com/fluencelabs/redis
synced 2025-06-14 17:51:21 +00:00
Merge pull request #1567 from mattsta/fix-cluster-join
Bind source address for cluster communication
This commit is contained in:
@ -2407,9 +2407,14 @@ void clusterCron(void) {
|
||||
mstime_t old_ping_sent;
|
||||
clusterLink *link;
|
||||
|
||||
fd = anetTcpNonBlockConnect(server.neterr, node->ip,
|
||||
node->port+REDIS_CLUSTER_PORT_INCR);
|
||||
if (fd == -1) continue;
|
||||
fd = anetTcpNonBlockBindConnect(server.neterr, node->ip,
|
||||
node->port+REDIS_CLUSTER_PORT_INCR, server.bindaddr[0]);
|
||||
if (fd == -1) {
|
||||
redisLog(REDIS_DEBUG, "Unable to connect to "
|
||||
"Cluster Client [%s]:%d", node->ip,
|
||||
node->port+REDIS_CLUSTER_PORT_INCR);
|
||||
continue;
|
||||
}
|
||||
link = createClusterLink(node);
|
||||
link->fd = fd;
|
||||
node->link = link;
|
||||
|
Reference in New Issue
Block a user