Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow sending commands after sending an unsubscribe #1036

Merged
merged 2 commits into from
Jan 18, 2022

Conversation

bjosv
Copy link
Contributor

@bjosv bjosv commented Jan 3, 2022

When unsubscribing from the last channel we move from the "subscribe" state to a normal state.
These states uses different holders for the command callback information used for non-subscribe commands.
By moving the callback information during the state change the callback order can be maintained.

Added a test to trigger the fault.

Fixes #968 (last part)

(and replaces #1034)

Verify that commands are handled after unsubscribing from a channel.
A command is sent before the `unsubscribe` response is received,
which currently triggers an assert in async.c:567:

`redisProcessCallbacks: Assertion `(c->flags & REDIS_SUBSCRIBED || c->flags & REDIS_MONITORING)' failed.`
When unsubscribing from the last channel we move from the `subscribe`
state to a normal state. These states uses different holders for the
command callback information.
By moving the callback info during the state change the callback order
can be maintained.
@michael-grunder
Copy link
Collaborator

Merged, thanks for all your recent contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect handling of commands in pub/sub state with RESP3
2 participants