Skip to content

Commit

Permalink
Only disconnect connections that were established by node-resque.
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurschreiber committed May 28, 2015
1 parent bf847c4 commit 3e515fc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ connection.prototype.connect = function(callback){

connection.prototype.disconnect = function(){
var self = this;
return self.redis.quit();
// Only disconnect if we established the redis connection on our own.
if (!self.options.redis) {
return self.redis.quit();
}
}

connection.prototype.key = function(){
Expand Down

0 comments on commit 3e515fc

Please sign in to comment.