提交 31f2ecf4 编写于 作者: A antirez

MIGRATE now let the client distinguish I/O errors and timeouts from other erros.

上级 f8ea19e5
......@@ -1614,7 +1614,7 @@ void migrateCommand(redisClient *c) {
return;
}
if ((aeWait(fd,AE_WRITABLE,timeout*1000) & AE_WRITABLE) == 0) {
addReplyError(c,"Timeout connecting to the client");
addReplySds(c,sdsnew("-IOERR error or timeout connecting to the client\r\n"));
return;
}
......@@ -1685,19 +1685,13 @@ void migrateCommand(redisClient *c) {
return;
socket_wr_err:
redisLog(REDIS_NOTICE,"Can't write to target node for MIGRATE: %s",
strerror(errno));
addReplyErrorFormat(c,"MIGRATE failed, writing to target node: %s.",
strerror(errno));
addReplySds(c,sdsnew("-IOERR error or timeout writing to target instance\r\n"));
sdsfree(cmd.io.buffer.ptr);
close(fd);
return;
socket_rd_err:
redisLog(REDIS_NOTICE,"Can't read from target node for MIGRATE: %s",
strerror(errno));
addReplyErrorFormat(c,"MIGRATE failed, reading from target node: %s.",
strerror(errno));
addReplySds(c,sdsnew("-IOERR error or timeout reading from target node\r\n"));
sdsfree(cmd.io.buffer.ptr);
close(fd);
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册