diff options
author | Matt Stancliff <matt@genges.com> | 2014-02-19 17:26:33 -0500 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-03-11 11:09:37 +0100 |
commit | 6f4b5ef6d53a12aa1cd23854028fab478482d8ac (patch) | |
tree | 999667b976213f56da0e2eb053cda6127130d0cd | |
parent | 4d5ba5962cc178b5e79cce09e763e4af84007983 (diff) | |
download | redis-6f4b5ef6d53a12aa1cd23854028fab478482d8ac.tar.gz |
Fix "can't bind to address" error reporting.
Report the actual port used for the listening attempt instead of
server.port.
Originally, Redis would just listen on server.port.
But, with clustering, Redis uses a Cluster Port too,
so we can't say server.port is always where we are listening.
If you tried to launch Redis with a too-high port number (any
port where Port+10000 > 65535), Redis would refuse to start, but
only print an error saying it can't connect to the Redis port.
This patch fixes much confusions.
-rw-r--r-- | src/redis.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/redis.c b/src/redis.c index 1219fdbd8..35df416ff 100644 --- a/src/redis.c +++ b/src/redis.c @@ -1582,7 +1582,7 @@ int listenToPort(int port, int *fds, int *count) { redisLog(REDIS_WARNING, "Creating Server TCP listening socket %s:%d: %s", server.bindaddr[j] ? server.bindaddr[j] : "*", - server.port, server.neterr); + port, server.neterr); return REDIS_ERR; } (*count)++; |