summaryrefslogtreecommitdiff
path: root/src/networking.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/networking.c')
-rw-r--r--src/networking.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/networking.c b/src/networking.c
index 20d05a9e3..50c7d99ca 100644
--- a/src/networking.c
+++ b/src/networking.c
@@ -190,6 +190,7 @@ client *createClient(connection *conn) {
c->watched_keys = listCreate();
c->pubsub_channels = dictCreate(&objectKeyPointerValueDictType);
c->pubsub_patterns = listCreate();
+ c->pubsubshard_channels = dictCreate(&objectKeyPointerValueDictType);
c->peerid = NULL;
c->sockname = NULL;
c->client_list_node = NULL;
@@ -1424,9 +1425,11 @@ void freeClient(client *c) {
/* Unsubscribe from all the pubsub channels */
pubsubUnsubscribeAllChannels(c,0);
+ pubsubUnsubscribeShardAllChannels(c, 0);
pubsubUnsubscribeAllPatterns(c,0);
dictRelease(c->pubsub_channels);
listRelease(c->pubsub_patterns);
+ dictRelease(c->pubsubshard_channels);
/* Free data structures. */
listRelease(c->reply);
@@ -2592,6 +2595,7 @@ void resetCommand(client *c) {
discardTransaction(c);
pubsubUnsubscribeAllChannels(c,0);
+ pubsubUnsubscribeShardAllChannels(c, 0);
pubsubUnsubscribeAllPatterns(c,0);
if (c->name) {