mirror of
https://github.com/fluencelabs/redis
synced 2025-06-01 19:41:20 +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
9c9914d779
commit
2a951ce502
@ -2421,7 +2421,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