]> git.saurik.com Git - redis.git/blobdiff - src/replication.c
Merge pull request #741 from Run/typo
[redis.git] / src / replication.c
index b43e9927f5886cc1c77ede523d38a68ba7fda599..222032cfa31d572e7d54e4188e85d504d8c97088 100644 (file)
@@ -3,6 +3,7 @@
 #include <sys/time.h>
 #include <unistd.h>
 #include <fcntl.h>
+#include <sys/socket.h>
 #include <sys/stat.h>
 
 /* ---------------------------------- MASTER -------------------------------- */
@@ -53,10 +54,12 @@ void replicationFeedMonitors(redisClient *c, list *monitors, int dictid, robj **
     gettimeofday(&tv,NULL);
     cmdrepr = sdscatprintf(cmdrepr,"%ld.%06ld ",(long)tv.tv_sec,(long)tv.tv_usec);
     if (c->flags & REDIS_LUA_CLIENT) {
-        cmdrepr = sdscatprintf(cmdrepr,"[%d lua] ", dictid);
+        cmdrepr = sdscatprintf(cmdrepr,"[%d lua] ",dictid);
+    } else if (c->flags & REDIS_UNIX_SOCKET) {
+        cmdrepr = sdscatprintf(cmdrepr,"[%d unix:%s] ",dictid,server.unixsocket);
     } else {
         anetPeerToString(c->fd,ip,&port);
-        cmdrepr = sdscatprintf(cmdrepr,"[%d %s:%d] ", dictid,ip,port);
+        cmdrepr = sdscatprintf(cmdrepr,"[%d %s:%d] ",dictid,ip,port);
     }
 
     for (j = 0; j < argc; j++) {
@@ -720,7 +723,7 @@ void replicationCron(void) {
     if (server.masterhost && server.repl_state == REDIS_REPL_TRANSFER &&
         (time(NULL)-server.repl_transfer_lastio) > server.repl_timeout)
     {
-        redisLog(REDIS_WARNING,"Timeout receiving bulk data from MASTER...");
+        redisLog(REDIS_WARNING,"Timeout receiving bulk data from MASTER... If the problem persists try to set the 'repl-timeout' parameter in redis.conf to a larger value.");
         replicationAbortSyncTransfer();
     }