summaryrefslogtreecommitdiff
path: root/hiredis.c
diff options
context:
space:
mode:
authorMichael Grunder <michael.grunder@gmail.com>2020-05-21 11:12:18 -0700
committerGitHub <noreply@github.com>2020-05-21 11:12:18 -0700
commit83bba659b9dbd6c77baf2ff27ff6342317869a3e (patch)
treefde9796e555b926aa5822fed02691859b84ee2e8 /hiredis.c
parentc8999c66024b0de347adecb774d14963c08a66db (diff)
Add logic to handle RESP3 push messages (#819)
Fixes #815
Diffstat (limited to 'hiredis.c')
-rw-r--r--hiredis.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hiredis.c b/hiredis.c
index deb65a9..1c9e8ae 100644
--- a/hiredis.c
+++ b/hiredis.c
@@ -97,6 +97,7 @@ void freeReplyObject(void *reply) {
case REDIS_REPLY_ARRAY:
case REDIS_REPLY_MAP:
case REDIS_REPLY_SET:
+ case REDIS_REPLY_PUSH:
if (r->element != NULL) {
for (j = 0; j < r->elements; j++)
freeReplyObject(r->element[j]);
@@ -155,7 +156,8 @@ static void *createStringObject(const redisReadTask *task, char *str, size_t len
parent = task->parent->obj;
assert(parent->type == REDIS_REPLY_ARRAY ||
parent->type == REDIS_REPLY_MAP ||
- parent->type == REDIS_REPLY_SET);
+ parent->type == REDIS_REPLY_SET ||
+ parent->type == REDIS_REPLY_PUSH);
parent->element[task->idx] = r;
}
return r;
@@ -201,7 +203,8 @@ static void *createIntegerObject(const redisReadTask *task, long long value) {
parent = task->parent->obj;
assert(parent->type == REDIS_REPLY_ARRAY ||
parent->type == REDIS_REPLY_MAP ||
- parent->type == REDIS_REPLY_SET);
+ parent->type == REDIS_REPLY_SET ||
+ parent->type == REDIS_REPLY_PUSH);
parent->element[task->idx] = r;
}
return r;