Skip to content
Snippets Groups Projects
Unverified Commit bc066d89 authored by Claire's avatar Claire Committed by GitHub
Browse files

Fix timeline streaming stopping for multiple sessions instead of one (#17259)

* Fix timeline streaming stopping for multiple sessions instead of one

Fixes #17256.

In updating the code for a newer version of node-redis, #17183 also broke
redis subscription management when multiple streaming clients subscribe to the
same channel.

This commit restores the redis subscription management code.

* Let node-redis actually handle the subscriptions
parent e002f323
No related branches found
No related tags found
No related merge requests found
......@@ -197,10 +197,12 @@ const startWorker = async (workerId) => {
/**
* @param {string} channel
* @param {function(string): void} callback
*/
const unsubscribe = (channel) => {
const unsubscribe = (channel, callback) => {
log.silly(`Removing listener for ${channel}`);
redisSubscribeClient.unsubscribe(channel);
redisSubscribeClient.unsubscribe(channel, callback);
};
const FALSE_VALUES = [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment