nicolasff/webdis — pull request #43 by jmorse (2012-04-11 22:00:20+00:00)
Title: Fix subscribing over websockets

Fix subscribe commands over websockets causing worker thread redis contexts being locked into subscribe mode.

This patch emulates functionality already in cmd_run, in the context of
websockets. A client running "[P]SUBSCRIBE" will restrict the commands
allowed to be issued in the context used. Therefore, websocket clients
making subscriptions get their own context, so as to not pollute the
workers' own Redis contexts.

Resource/context deallocation should occur upon http client disconnect,
just as it is for client-specific contexts from cmd_run.