From 8d4f9f5a6ec36feabd056a6c2da32a6ae7e33a56 Mon Sep 17 00:00:00 2001 From: sairajzero Date: Sun, 5 Feb 2023 23:02:38 +0530 Subject: [PATCH] Update index.js --- lib/services/address/index.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/services/address/index.js b/lib/services/address/index.js index 8b514c9a..1586f185 100644 --- a/lib/services/address/index.js +++ b/lib/services/address/index.js @@ -1001,16 +1001,14 @@ AddressService.prototype._streamAddressSummary = function(address, options, stre //wait for queue to complete function(next) { - if(!q.started){ //no tx - console.debug("NO QUEUE, END"); + console.debug("WAITING FOR QUEUE TO COMPLETE", q.started) + + if(!q.started) //No tx in query return next(); - } - console.debug("WAITING FOR DRAIN") - q.drain = ()=> { - console.debug("END-DRAIN"); - next(); - }; + else + q.drain = () => next(); + } ], callback);