diff options
author | Björn Svensson <bjorn.a.svensson@est.tech> | 2022-02-02 22:42:23 +0100 |
---|---|---|
committer | Björn Svensson <bjorn.a.svensson@est.tech> | 2022-02-02 23:43:21 +0100 |
commit | b6fb548fc65497ce933cfd15b6fd91c700d4b34e (patch) | |
tree | c5fdf8ae447a2b58783e0d9512596ddc6b36a5e2 /async.c | |
parent | f8de9a4bd433791890572f7b9147e685653ddef9 (diff) |
Ignore pubsub replies without a channel/pattern
Diffstat (limited to 'async.c')
-rw-r--r-- | async.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -431,8 +431,10 @@ static int __redisGetSubscribeCallback(redisAsyncContext *ac, redisReply *reply, else callbacks = ac->sub.channels; + /* Ignore replies without a channel/pattern string */ + if (reply->element[1]->type != REDIS_REPLY_STRING) return REDIS_OK; + /* Locate the right callback */ - assert(reply->element[1]->type == REDIS_REPLY_STRING); sname = sdsnewlen(reply->element[1]->str,reply->element[1]->len); if (sname == NULL) goto oom; |