fix reference to this within a callback
This commit is contained in:
@ -419,7 +419,7 @@ Transport.prototype.sniff = function (cb) {
|
|||||||
try {
|
try {
|
||||||
hostsConfigs = nodesToHostCallback(resp.nodes);
|
hostsConfigs = nodesToHostCallback(resp.nodes);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
log.error(new Error('Unable to convert node list from ' + this.sniffEndpoint +
|
log.error(new Error('Unable to convert node list from ' + self.sniffEndpoint +
|
||||||
' to hosts durring sniff. Encountered error:\n' + (e.stack || e.message)));
|
' to hosts durring sniff. Encountered error:\n' + (e.stack || e.message)));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user