Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updating pool to continue to monitorconnections

  • Loading branch information...
commit 6b014f9297ef8c2ba98b63671e2e0274ae61c3b6 1 parent 2d27601
@calvinfo calvinfo authored
Showing with 5 additions and 6 deletions.
  1. +5 −6 lib/pool.js
View
11 lib/pool.js
@@ -84,17 +84,16 @@ Pool.prototype.connect = function(callback){
}
if(finished === len){
- if(self.clients.length === 0){
- return replyNotAvailable(callback);
- }
-
//set the keyspaces connection to be the pool
if(keyspace){
keyspace.connection = self;
}
//we only want to callback once, after we get the final connection
- callback(null, keyspace);
-
+ if(self.clients.length === 0){
+ replyNotAvailable(callback);
+ } else {
+ callback(null, keyspace);
+ }
//now that we have a connection, lets start monitoring
self.monitorConnections();
}
Please sign in to comment.
Something went wrong with that request. Please try again.