diff --git a/lib/services/address/index.js b/lib/services/address/index.js index 79cfb84a..21d91aff 100644 --- a/lib/services/address/index.js +++ b/lib/services/address/index.js @@ -891,6 +891,9 @@ AddressService.prototype._streamAddressSummary = function(address, options, stre streamer(err, tx); if((err || options.flag_stop) && q.idle()){ + + console.debug("KILL", options.flag_stop) + q.kill(); return callback(); @@ -950,8 +953,11 @@ AddressService.prototype._streamAddressSummary = function(address, options, stre txIdTransformStream._transform = function(chunk, enc, cb) { - if(options.flag_stop)//stop data query + if(options.flag_stop){ + //stop data query + console.debug("FLAG:", options.flag_stop) return txIdTransformStream.unpipe(); + } var txInfo = self._encoding.decodeAddressIndexKey(chunk); q.push({ txid: txInfo.txid, height: txInfo.height }, chunkCallback);