Commit 90038906 authored by antirez's avatar antirez
Browse files

Fix old anetPeerToString() API call in replication.c

parent c76df730
......@@ -2975,8 +2975,6 @@ int main(int argc, char **argv) {
}
if (server.ipfd_count > 0)
redisLog(REDIS_NOTICE,"The server is now ready to accept connections on port %d", server.port);
if (server.ip6fd > 0)
redisLog(REDIS_NOTICE,"The server is now ready to accept IPv6 connections on port %d", server.port6);
if (server.sofd > 0)
redisLog(REDIS_NOTICE,"The server is now ready to accept connections at %s", server.unixsocket);
}
......
......@@ -1614,10 +1614,10 @@ void replicationCron(void) {
if (slave->flags & REDIS_PRE_PSYNC_SLAVE) continue;
if ((server.unixtime - slave->repl_ack_time) > server.repl_timeout)
{
char ip[32];
char ip[REDIS_IP_STR_LEN];
int port;
if (anetPeerToString(slave->fd,ip,&port) != -1) {
if (anetPeerToString(slave->fd,ip,sizeof(ip),&port) != -1) {
redisLog(REDIS_WARNING,
"Disconnecting timedout slave: %s:%d",
ip, slave->slave_listening_port);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment