You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The block of code that round-robins the hosts will cause other properties that are part of the options argument to get over-written. (For instance, auth, and secure settings)
The line:
if (options.hosts) {
var nextHost = options.hosts.shift();
options.hosts.push(nextHost);
}
assumes that the options object only contains a hosts property.
ElasticSearchClient.prototype.createCall = function(params, options, cb) {
//If options.hosts round robin the hosts
if (options.hosts) {
var nextHost = options.hosts.shift();
options.hosts.push(nextHost);
}else{
nextHost=options;
}
if(typeof cb=='function'){
var call = new ElasticSearchCall(params, nextHost, cb);
call.exec();
}else{
return new ElasticSearchCall(params, nextHost);
}
}
The text was updated successfully, but these errors were encountered:
The block of code that round-robins the hosts will cause other properties that are part of the options argument to get over-written. (For instance, auth, and secure settings)
The line:
if (options.hosts) {
var nextHost = options.hosts.shift();
options.hosts.push(nextHost);
}
assumes that the options object only contains a hosts property.
ElasticSearchClient.prototype.createCall = function(params, options, cb) {
//If options.hosts round robin the hosts
if (options.hosts) {
var nextHost = options.hosts.shift();
options.hosts.push(nextHost);
}else{
nextHost=options;
}
if(typeof cb=='function'){
var call = new ElasticSearchCall(params, nextHost, cb);
call.exec();
}else{
return new ElasticSearchCall(params, nextHost);
}
}
The text was updated successfully, but these errors were encountered: