Skip to content

Commit 149b527

Browse files
committed
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.
1 parent e23d281 commit 149b527

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cluster.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1688,7 +1688,7 @@ int migrateGetSocket(redisClient *c, robj *host, robj *port, long timeout) {
16881688
anetTcpNoDelay(server.neterr,fd);
16891689

16901690
/* Check if it connects within the specified timeout. */
1691-
if ((aeWait(fd,AE_WRITABLE,timeout*1000) & AE_WRITABLE) == 0) {
1691+
if ((aeWait(fd,AE_WRITABLE,timeout) & AE_WRITABLE) == 0) {
16921692
sdsfree(name);
16931693
addReplySds(c,sdsnew("-IOERR error or timeout connecting to the client\r\n"));
16941694
close(fd);

0 commit comments

Comments
 (0)