Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

backcompat - init() should return a ref to the wrapper

  • Loading branch information...
commit f281c02b2156c11ecff897d164b101504f7efab7 1 parent a00661a
Dave Dopson authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/zookeeper.js
5 lib/zookeeper.js
View
@@ -178,7 +178,10 @@ ZooKeeper.prototype.init = function init(config) {
self.data_as_buffer = config.data_as_buffer;
if(this.logger) this.logger("Encoding for data output: %s", self.encoding);
}
- return this._native.init.call(this._native, config);
+ this._native.init.call(this._native, config);
+
+ // The native code returns a ref to itself. So we should return a ref to the wrapper object
+ return self;
}
ZooKeeper.prototype.connect = function connect(options, cb) {
Please sign in to comment.
Something went wrong with that request. Please try again.