Skip to content

Commit

Permalink
Fix exit of ETL on exception (XRPLF#964)
Browse files Browse the repository at this point in the history
Fixes XRPLF#708
  • Loading branch information
godexsoft authored Nov 1, 2023
1 parent 5145d07 commit 058df4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/etl/ETLService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ ETLService::monitor()
LOG(log_.debug()) << "Database is populated. "
<< "Starting monitor loop. sequence = " << nextSequence;

while (true) {
while (not isStopping()) {
nextSequence = publishNextSequence(nextSequence);
}
}
Expand Down Expand Up @@ -199,7 +199,7 @@ ETLService::monitorReadOnly()
cacheLoader_.load(latestSequence);
latestSequence++;

while (true) {
while (not isStopping()) {
if (auto rng = backend_->hardFetchLedgerRangeNoThrow(); rng && rng->maxSequence >= latestSequence) {
ledgerPublisher_.publish(latestSequence, {});
latestSequence = latestSequence + 1;
Expand Down

0 comments on commit 058df4d

Please sign in to comment.