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

Add QUIT to the list of commands acceptable for PUBSUB channels #7

Merged
merged 2 commits into from
Mar 30, 2016

Conversation

robhague
Copy link

I have a long-running Tornado server where I'd like to have a number of relatively short-lived Redis PUBSUB connections (one per HTTP client connection). To avoid this set of Redis connections growing indefinitely, I want to close them once the HTTP client disconnects. However, Toredis currently asserts that QUIT cannot (as a normal command) be run on PUBSUB connections.

This change adds QUIT to the whitelist of commands for PUBSUB connections. I've added a unit test for the behaviour (which fails as expected without the change to the whitelist), and it appears to work as desired in my application. I can't see anything in the Redis documentation that says QUIT can't be used on PUBSUB channels; however, if I'm missing some subtlety let me know and I'll investigate further.

@mrjoes mrjoes merged commit 2e883a9 into mrjoes:master Mar 30, 2016
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.

2 participants