Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

Commit

Permalink
when empty data returns, loader never finishes and never get killed
Browse files Browse the repository at this point in the history
  • Loading branch information
eusorov authored and askmike committed Aug 27, 2018
1 parent a418c4a commit 5a798fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/tools/candleLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const handleCandles = (err, data) => {
util.die('Encountered an error..')
}

if(_.size(data) && _.last(data).start >= toUnix)
if(_.size(data) && _.last(data).start >= toUnix || iterator.from.unix() >= toUnix)
DONE = true;

batcher.write(data);
Expand All @@ -97,4 +97,4 @@ const handleCandles = (err, data) => {

const handleBatchedCandles = candle => {
result.push(candle);
}
}

0 comments on commit 5a798fb

Please sign in to comment.