CONFIG SET: accept slave-priority zero, it is valid.
This commit is contained in:
parent
650fc5218f
commit
9aa989d073
@ -809,7 +809,7 @@ void configSetCommand(redisClient *c) {
|
|||||||
server.repl_disable_tcp_nodelay = yn;
|
server.repl_disable_tcp_nodelay = yn;
|
||||||
} else if (!strcasecmp(c->argv[2]->ptr,"slave-priority")) {
|
} else if (!strcasecmp(c->argv[2]->ptr,"slave-priority")) {
|
||||||
if (getLongLongFromObject(o,&ll) == REDIS_ERR ||
|
if (getLongLongFromObject(o,&ll) == REDIS_ERR ||
|
||||||
ll <= 0) goto badfmt;
|
ll < 0) goto badfmt;
|
||||||
server.slave_priority = ll;
|
server.slave_priority = ll;
|
||||||
} else if (!strcasecmp(c->argv[2]->ptr,"min-slaves-to-write")) {
|
} else if (!strcasecmp(c->argv[2]->ptr,"min-slaves-to-write")) {
|
||||||
if (getLongLongFromObject(o,&ll) == REDIS_ERR ||
|
if (getLongLongFromObject(o,&ll) == REDIS_ERR ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user