Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
37cc07dd
Commit
37cc07dd
authored
Apr 02, 2012
by
antirez
Browse files
MIGRATE now let the client distinguish I/O errors and timeouts from other erros.
parent
285df7b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/migrate.c
View file @
37cc07dd
...
...
@@ -158,7 +158,7 @@ void migrateCommand(redisClient *c) {
return
;
}
if
((
aeWait
(
fd
,
AE_WRITABLE
,
timeout
*
1000
)
&
AE_WRITABLE
)
==
0
)
{
addReply
Error
(
c
,
"T
imeout connecting to the client
"
);
addReply
Sds
(
c
,
sdsnew
(
"-IOERR error or t
imeout connecting to the client
\r\n
"
)
);
return
;
}
...
...
@@ -229,19 +229,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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment