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.
This commit is contained in:
antirez 2012-11-12 14:00:59 +01:00
parent e23d281e48
commit 149b527a74

View File

@ -1688,7 +1688,7 @@ int migrateGetSocket(redisClient *c, robj *host, robj *port, long timeout) {
anetTcpNoDelay(server.neterr,fd); anetTcpNoDelay(server.neterr,fd);
/* Check if it connects within the specified timeout. */ /* 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); sdsfree(name);
addReplySds(c,sdsnew("-IOERR error or timeout connecting to the client\r\n")); addReplySds(c,sdsnew("-IOERR error or timeout connecting to the client\r\n"));
close(fd); close(fd);