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.
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.