From 0b646fe45306841517a6382346d0c3daaeb648cc Mon Sep 17 00:00:00 2001 From: sairajzero Date: Sun, 5 Feb 2023 16:23:34 +0530 Subject: [PATCH] Update index.js --- lib/services/address/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/services/address/index.js b/lib/services/address/index.js index a7e824dd..ee60cf82 100644 --- a/lib/services/address/index.js +++ b/lib/services/address/index.js @@ -876,7 +876,7 @@ AddressService.prototype._streamAddressSummary = function(address, options, stre //q.pause(); //pause and wait until queue is set function chunkCallback(err, tx){ - console.debug("CHUNK", td_count, q.length(), q.idle()); + console.debug("CHUNK", td_count, q.length(), q.killed); if(!err && !tx) //no error or tx data (duplicate calls will have empty tx value) return; @@ -890,11 +890,12 @@ AddressService.prototype._streamAddressSummary = function(address, options, stre streamer(err, tx); - if((err || options.flag_stop) && !q.idle()){ + if((err || options.flag_stop) && !q.killed){ console.debug("KILL", options.flag_stop) q.kill(); + q.killed = true; return callback(); }