Skip to content

Commit

Permalink
Don't attempt to create a Redis connection if "client" is provided.
Browse files Browse the repository at this point in the history
refs #4262
  • Loading branch information
sgress454 committed Jan 15, 2018
1 parent 1700788 commit 0b42c59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/hooks/session/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 0b42c59

Please sign in to comment.