From c0807ab327dd28bd7cdb986bafe08caadf667859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 1 May 2017 15:37:58 -0400 Subject: [PATCH] closes #5639 --- src/socket.io/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/socket.io/index.js b/src/socket.io/index.js index 93c1697c98..00d3433a3d 100644 --- a/src/socket.io/index.js +++ b/src/socket.io/index.js @@ -219,7 +219,11 @@ function addRedisAdapter(io) { var redis = require('../database/redis'); var pub = redis.connect(); var sub = redis.connect(); - io.adapter(redisAdapter({ pubClient: pub, subClient: sub })); + io.adapter(redisAdapter({ + key: 'db:' + nconf.get('redis:database') + ':adapter_key', + pubClient: pub, + subClient: sub, + })); } else if (nconf.get('isCluster') === 'true') { winston.warn('[socket.io] Clustering detected, you are advised to configure Redis as a websocket store.'); }