diff options
author | Bjorn Svensson <bjorn.a.svensson@est.tech> | 2021-12-22 19:44:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-22 10:44:29 -0800 |
commit | 58aacdac65a04f611e2a659cd60ffa283b8bdf54 (patch) | |
tree | 40e2e95128f4952b1e511fcb7b2324a2532c05c1 /hiredis.h | |
parent | d3384260e7e1726747bd78474e4b0874a4b0a236 (diff) |
Handle array response in parallell with pubsub using RESP3 (#1014)
RESP3 allows sending commands in parallell with pubsub handling
and these commands might get responded with a REDIS_REPLY_ARRAY.
This conflicts with the pubsub response handling for RESP2 and
results in a faulty state when using RESP3.
Add functionality to keep track of PUSH/RESP3 support on the connection
and only expect the message type REDIS_REPLY_PUSH as subscribe messages
when once seen.
Diffstat (limited to 'hiredis.h')
-rw-r--r-- | hiredis.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -80,6 +80,9 @@ typedef long long ssize_t; /* Flag that is set when we should set SO_REUSEADDR before calling bind() */ #define REDIS_REUSEADDR 0x80 +/* Flag that is set when the async connection supports push replies. */ +#define REDIS_SUPPORTS_PUSH 0x100 + /** * Flag that indicates the user does not want the context to * be automatically freed upon error |