Update index.js
This commit is contained in:
parent
76eb2debdd
commit
0b646fe453
@ -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();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user