From 0b42c59228eda100b7eb64e776cbf26f4b90c1cf Mon Sep 17 00:00:00 2001 From: Scott Gress Date: Mon, 15 Jan 2018 09:38:16 -0600 Subject: [PATCH] Don't attempt to create a Redis connection if "client" is provided. refs #4262 --- lib/hooks/session/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hooks/session/index.js b/lib/hooks/session/index.js index f0ef03ebf..f8616837c 100644 --- a/lib/hooks/session/index.js +++ b/lib/hooks/session/index.js @@ -288,8 +288,8 @@ module.exports = function(app) { // └─┘└─┘ ┴ └─┘┴ ┴└─└─┘─┴┘┴└─┘ ┴ ┴─┴┘┴ ┴┴ ┴ └─┘┴└─ (function maybeConnectToRedis(proceed) { - // If the adapter isn't set to `connect-redis`, skip this part. - if (app.config.session.adapter !== 'connect-redis') { + // If the adapter isn't set to `connect-redis`, or an existing Redis client is being provided, skip this part. + if (app.config.session.adapter !== 'connect-redis' || app.config.session.client) { return proceed(); }