mirror of
https://github.com/fluencelabs/redis
synced 2025-03-17 16:10:50 +00:00
Cluster: be explicit about passing NULL as bind addr for connect.
The code was already correct but it was using that bindaddr[0] is set to NULL as a side effect of current implementation if no bind address is configured. This is not guarnteed to hold true in the future.
This commit is contained in:
parent
3e8a92ef8d
commit
ed8c55237b
@ -2408,7 +2408,8 @@ void clusterCron(void) {
|
||||
clusterLink *link;
|
||||
|
||||
fd = anetTcpNonBlockBindConnect(server.neterr, node->ip,
|
||||
node->port+REDIS_CLUSTER_PORT_INCR, server.bindaddr[0]);
|
||||
node->port+REDIS_CLUSTER_PORT_INCR,
|
||||
server.bindaddr_count ? server.bindaddr[0] : NULL);
|
||||
if (fd == -1) {
|
||||
redisLog(REDIS_DEBUG, "Unable to connect to "
|
||||
"Cluster Node [%s]:%d -> %s", node->ip,
|
||||
|
Loading…
x
Reference in New Issue
Block a user