Fix reference to node

This commit is contained in:
Braydon Fuller 2016-09-20 14:48:52 -04:00
parent 4a99870813
commit 384d06c196

View File

@ -718,7 +718,6 @@ Bitcoin.prototype._subscribeZmqEvents = function(node) {
};
Bitcoin.prototype._initZmqSubSocket = function(node, zmqUrl) {
var self = this;
node.zmqSubSocket = zmq.socket('sub');
node.zmqSubSocket.on('connect', function(fd, endPoint) {
@ -736,7 +735,7 @@ Bitcoin.prototype._initZmqSubSocket = function(node, zmqUrl) {
node.zmqSubSocket.on('monitor_error', function(err) {
log.error('Error in monitoring: %s, will restart monitoring in 5 seconds', err);
setTimeout(function() {
self.zmqSubSocket.monitor(500, 0);
node.zmqSubSocket.monitor(500, 0);
}, 5000);
});