Permalink
Browse files

Returning JS object on close event

  • Loading branch information...
1 parent 484763e commit 5b670a02d2ff1564afaebaebe71f35f51ffa3ed7 @fastman fastman committed Sep 17, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/zookeeper.js
View
@@ -23,7 +23,7 @@ function ZooKeeper(config) {
self._native.emit = function(ev, a1, a2, a3) {
if(self.logger)
self.logger("Emitting '" + ev + "' with args: " + a1 + ", " + a2 + ", " + a3);
- if(ev === 'connect') {
+ if(ev === 'connect' || ev === 'close') {
// the event is passing the native object. need to mangle to return the wrapper
a1 = self;
}

0 comments on commit 5b670a0

Please sign in to comment.