Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var next = function(rc,err,pth) {
if( rc && rc != ZooKeeper.ZNODEEXISTS ) {
cb( new Error("Unable to create node: " + path + " :" +err ) );
} else {
if( segments.length > 0 ) {
p = p + "/" + segments.shift();
zk.a_create( p, '', 0, next );
} else {
cb();
}
}
};
next();