Skip to content

Commit

Permalink
Minor change to node-redis connection options that should prevent err…
Browse files Browse the repository at this point in the history
…ors during application run.
  • Loading branch information
Ghnuberath committed Apr 26, 2016
1 parent 735db0b commit 06fb928
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/ravel.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ class Ravel extends EventEmitter {
const sessionStoreArgs = {
host:this.get('redis host'),
port:this.get('redis port'),
db:0 //we stick to 0 because clustered redis doesn't support multiple dbs
db:0, //we stick to 0 because clustered redis doesn't support multiple dbs
'no_ready_check': true
};
if (this.get('redis password')) {
sessionStoreArgs.pass = this.get('redis password');
Expand Down
9 changes: 7 additions & 2 deletions lib/util/kvstore.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,16 @@ module.exports = function(ravelInstance) {
client.closing = true;
client.end();
}
const newClient = redis.createClient(ravelInstance.get('redis port'), ravelInstance.get('redis host'), {});
const newClient = redis.createClient(ravelInstance.get('redis port'), ravelInstance.get('redis host'), {
'no_ready_check': true
});
if (ravelInstance.get('redis password')) {
newClient.auth(ravelInstance.get('redis password'));
}
newClient.once('end', function() {
newClient.once('end', () => {
replace();
});
newClient.once('error', () => {
replace();
});
//copy over redis methods to client reference
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ravel",
"version": "0.11.5",
"version": "0.11.6",
"author": "Sean McIntyre <[email protected]>",
"description": "Ravel Rapid Application Development Framework",
"keywords": [
Expand Down

0 comments on commit 06fb928

Please sign in to comment.