From: antirez Date: Mon, 12 Nov 2012 13:00:59 +0000 (+0100) Subject: MIGRATE timeout should be in milliseconds. X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/149b527a74a8336e8b0a287472c9ae25e3286fba MIGRATE timeout should be in milliseconds. While it is documented that the MIGRATE timeout is in milliseconds, it was in seconds instead. This commit fixes the problem. --- diff --git a/src/cluster.c b/src/cluster.c index 3b560cb0..3e23c73f 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -1688,7 +1688,7 @@ int migrateGetSocket(redisClient *c, robj *host, robj *port, long timeout) { anetTcpNoDelay(server.neterr,fd); /* Check if it connects within the specified timeout. */ - if ((aeWait(fd,AE_WRITABLE,timeout*1000) & AE_WRITABLE) == 0) { + if ((aeWait(fd,AE_WRITABLE,timeout) & AE_WRITABLE) == 0) { sdsfree(name); addReplySds(c,sdsnew("-IOERR error or timeout connecting to the client\r\n")); close(fd);