mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 08:38:27 -05:00
MIGRATE now let the client distinguish I/O errors and timeouts from other erros.
This commit is contained in:
parent
f8ea19e539
commit
31f2ecf436
@ -1614,7 +1614,7 @@ void migrateCommand(redisClient *c) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((aeWait(fd,AE_WRITABLE,timeout*1000) & AE_WRITABLE) == 0) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1685,19 +1685,13 @@ void migrateCommand(redisClient *c) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
socket_wr_err:
|
socket_wr_err:
|
||||||
redisLog(REDIS_NOTICE,"Can't write to target node for MIGRATE: %s",
|
addReplySds(c,sdsnew("-IOERR error or timeout writing to target instance\r\n"));
|
||||||
strerror(errno));
|
|
||||||
addReplyErrorFormat(c,"MIGRATE failed, writing to target node: %s.",
|
|
||||||
strerror(errno));
|
|
||||||
sdsfree(cmd.io.buffer.ptr);
|
sdsfree(cmd.io.buffer.ptr);
|
||||||
close(fd);
|
close(fd);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
socket_rd_err:
|
socket_rd_err:
|
||||||
redisLog(REDIS_NOTICE,"Can't read from target node for MIGRATE: %s",
|
addReplySds(c,sdsnew("-IOERR error or timeout reading from target node\r\n"));
|
||||||
strerror(errno));
|
|
||||||
addReplyErrorFormat(c,"MIGRATE failed, reading from target node: %s.",
|
|
||||||
strerror(errno));
|
|
||||||
sdsfree(cmd.io.buffer.ptr);
|
sdsfree(cmd.io.buffer.ptr);
|
||||||
close(fd);
|
close(fd);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user