diff options
author | Michael Grunder <michael.grunder@gmail.com> | 2020-05-21 11:12:18 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-21 11:12:18 -0700 |
commit | 83bba659b9dbd6c77baf2ff27ff6342317869a3e (patch) | |
tree | fde9796e555b926aa5822fed02691859b84ee2e8 /hiredis.c | |
parent | c8999c66024b0de347adecb774d14963c08a66db (diff) |
Add logic to handle RESP3 push messages (#819)
Fixes #815
Diffstat (limited to 'hiredis.c')
-rw-r--r-- | hiredis.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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; |