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);