Skip to content

Commit

Permalink
Fail quicker when TLE downloading fails
Browse files Browse the repository at this point in the history
  • Loading branch information
JVital2013 authored Oct 27, 2023
1 parent 9262b58 commit e4748c3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src-core/common/tracking/tle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ namespace satdump
std::filesystem::create_directories(std::filesystem::path(path).parent_path());

bool success = true;
bool all_success = true;
TLERegistry new_registry;

for (int norad : norads_to_fetch)
Expand Down Expand Up @@ -128,12 +127,12 @@ namespace satdump

if (!success)
{
all_success = false;
logger->warn("Failed to get TLE for %s", url_str.c_str());
break;
}
}

if (all_success)
if (success)
{
std::ofstream outfile(path, std::ios::trunc);
for (TLE& tle : new_registry)
Expand Down

0 comments on commit e4748c3

Please sign in to comment.