Skip to content
This repository has been archived by the owner on Feb 22, 2019. It is now read-only.

Commit

Permalink
add callback to close method and emit connect [ closes #114 ]
Browse files Browse the repository at this point in the history
  • Loading branch information
devdazed committed Oct 8, 2013
1 parent 310fd94 commit 93fc7fd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
8 changes: 8 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,11 @@
* Fixed CQL 3 in v 0.1.x [ @devdazed #93 ]


0.6.3 / 2013-10-08
==================

* Support for multiple increments at once [ @natemueller #117 ]
* Fix for collection deserializing [ @industral #96 ]
* Fix for CQL3 UUID escaping [ @industral #98 ]
* Deserialize the key [ @wwwy3y3 #111 ]
* Support latest Node [ @JohnMcLear #116 ]
5 changes: 4 additions & 1 deletion lib/pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ Pool.prototype.connect = function(callback){
}
self.clients.push(connection);
if (connected === 1) {
self.emit('connect');
callback(null, keyspace);
}
if (self.closing) {
Expand Down Expand Up @@ -335,7 +336,8 @@ Pool.prototype.monitorConnections = function(){
/**
* Closes all open connections
*/
Pool.prototype.close = function(){
Pool.prototype.close = function(callback){
callback = callback || NOOP;
var self = this, i = 0, j = 0, len = this.clients.length;

// Make sure no intervals get set
Expand All @@ -351,6 +353,7 @@ Pool.prototype.close = function(){
j += 1;
if(j === len){
self.emit('close');
callback();
}
}

Expand Down

0 comments on commit 93fc7fd

Please sign in to comment.