mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 16:40:50 +00:00
Fix setDeferredMultiBulkLength() c->reply_bytes handling with EMBSTR
This function missed proper handling of reply_bytes when gluing to the previous object was used. The issue was introduced with the EMBSTR new string object encoding. This fixes issue #1208.
This commit is contained in:
parent
7ed7652846
commit
dbaa5b0b9a
@ -413,7 +413,10 @@ void setDeferredMultiBulkLength(redisClient *c, void *node, long length) {
|
||||
/* Only glue when the next node is non-NULL (an sds in this case) */
|
||||
if (next->ptr != NULL) {
|
||||
c->reply_bytes -= zmalloc_size_sds(len->ptr);
|
||||
c->reply_bytes -= zmalloc_size_sds(next->ptr);
|
||||
if (next->encoding == REDIS_ENCODING_RAW)
|
||||
c->reply_bytes -= zmalloc_size_sds(next->ptr);
|
||||
else
|
||||
c->reply_bytes -= sdslen(next->ptr);
|
||||
len->ptr = sdscatlen(len->ptr,next->ptr,sdslen(next->ptr));
|
||||
c->reply_bytes += zmalloc_size_sds(len->ptr);
|
||||
listDelNode(c->reply,ln->next);
|
||||
|
Loading…
x
Reference in New Issue
Block a user