mirror of
https://github.com/fluencelabs/redis
synced 2025-03-16 15:40:49 +00:00
Fixed error message generation in PFDEBUG GETREG.
Bulk length for registers was emitted too early, so if there was a bug the reply looked like a long array with just one element, blocking the client as result.
This commit is contained in:
parent
82c31f750d
commit
1ee18db922
@ -1246,12 +1246,13 @@ void pfdebugCommand(redisClient *c) {
|
||||
if (!strcasecmp(cmd,"getreg")) {
|
||||
if (c->argc != 3) goto arityerr;
|
||||
|
||||
addReplyMultiBulkLen(c,HLL_REGISTERS);
|
||||
if (hllSparseToDense(o) == REDIS_ERR) {
|
||||
addReplyError(c,"HLL sparse encoding is corrupted");
|
||||
return;
|
||||
}
|
||||
|
||||
hdr = o->ptr;
|
||||
addReplyMultiBulkLen(c,HLL_REGISTERS);
|
||||
for (j = 0; j < HLL_REGISTERS; j++) {
|
||||
uint8_t val;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user