fix reference to this within a callback

(cherry picked from commit 9d3b966f63)
This commit is contained in:
spalger
2017-06-15 22:34:23 -07:00
parent c6d2e3d054
commit bdde6949b9

View File

@ -419,7 +419,7 @@ Transport.prototype.sniff = function (cb) {
try {
hostsConfigs = nodesToHostCallback(resp.nodes);
} 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)));
return;
}