mirror of
https://github.com/fluencelabs/redis
synced 2025-04-01 23:31:03 +00:00
CLUSTER MEET: better error messages when address is invalid.
Fixes issue #1734.
This commit is contained in:
parent
74435aba47
commit
71d0e7e0ea
@ -3287,17 +3287,19 @@ void clusterCommand(redisClient *c) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!strcasecmp(c->argv[1]->ptr,"meet") && c->argc == 4) {
|
if (!strcasecmp(c->argv[1]->ptr,"meet") && c->argc == 4) {
|
||||||
long port;
|
long long port;
|
||||||
|
|
||||||
if (getLongFromObjectOrReply(c, c->argv[3], &port, NULL) != REDIS_OK) {
|
if (getLongLongFromObject(c->argv[3], &port) != REDIS_OK) {
|
||||||
addReplyError(c,"Invalid TCP port specified");
|
addReplyErrorFormat(c,"Invalid TCP port specified: %s",
|
||||||
|
(char*)c->argv[3]->ptr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clusterStartHandshake(c->argv[2]->ptr,port) == 0 &&
|
if (clusterStartHandshake(c->argv[2]->ptr,port) == 0 &&
|
||||||
errno == EINVAL)
|
errno == EINVAL)
|
||||||
{
|
{
|
||||||
addReplyError(c,"Invalid node address specified");
|
addReplyErrorFormat(c,"Invalid node address specified: %s:%s",
|
||||||
|
(char*)c->argv[2]->ptr, (char*)c->argv[3]->ptr);
|
||||||
} else {
|
} else {
|
||||||
addReply(c,shared.ok);
|
addReply(c,shared.ok);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user