You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a push callback is set, redisCommand() (and friends) expect an in-band reply to each command while any push replies are dispatched to the push callback.
The problem is the [P|S][UN]SUBSCRIBE commands, because on success, they have no in-band reply. On success, they generate one or more PUSH replies. This causes redisCommand() to hang indefinitely in redisNextInBandReplyFromReader().
I raised the issue here: redis/redis#11784. It can't be fixed since it would be a breaking change, but instead we ended up improving the documentation of these commands: redis/redis-doc#2327. Now, these commands contain the following note:
When successful, this command doesn't return anything. Instead, for each channel, one message with the first element being the string "subscribe" is pushed as a confirmation that the command succeeded.
Solution?
The only solution I can think of is to check the command sent to Redis. If it ends in "subscribe" (case-insensitive), the command requires either an error reply or at least one push message (one per channel) where the first element is the name of the command in lowercase.
Workarounds
The current workaround is to unset the push callback or not use RESP3.
The text was updated successfully, but these errors were encountered:
Hi Michael,
When a push callback is set, redisCommand() (and friends) expect an in-band reply to each command while any push replies are dispatched to the push callback.
The problem is the [P|S][UN]SUBSCRIBE commands, because on success, they have no in-band reply. On success, they generate one or more PUSH replies. This causes redisCommand() to hang indefinitely in redisNextInBandReplyFromReader().
I raised the issue here: redis/redis#11784. It can't be fixed since it would be a breaking change, but instead we ended up improving the documentation of these commands: redis/redis-doc#2327. Now, these commands contain the following note:
Solution?
The only solution I can think of is to check the command sent to Redis. If it ends in "subscribe" (case-insensitive), the command requires either an error reply or at least one push message (one per channel) where the first element is the name of the command in lowercase.
Workarounds
The current workaround is to unset the push callback or not use RESP3.
The text was updated successfully, but these errors were encountered: