Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
4cc8de1a
Commit
4cc8de1a
authored
Feb 01, 2018
by
artix
Browse files
Cluster Manager: reply error catch for MEET command
parent
65d37960
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-cli.c
View file @
4cc8de1a
...
...
@@ -2949,7 +2949,16 @@ assign_replicas:
redisReply
*
reply
=
NULL
;
reply
=
CLUSTER_MANAGER_COMMAND
(
node
,
"cluster meet %s %d"
,
first
->
ip
,
first
->
port
);
if
(
reply
!=
NULL
)
freeReplyObject
(
reply
);
int
is_err
=
0
;
if
(
reply
!=
NULL
)
{
if
((
is_err
=
reply
->
type
==
REDIS_REPLY_ERROR
))
CLUSTER_MANAGER_PRINT_REPLY_ERROR
(
node
,
reply
->
str
);
freeReplyObject
(
reply
);
}
else
{
is_err
=
1
;
fprintf
(
stderr
,
"Failed to send CLUSTER MEET command.
\n
"
);
}
if
(
is_err
)
goto
cmd_err
;
}
// Give one second for the join to start, in order to avoid that
// waiting for cluster join will find all the nodes agree about
...
...
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