Do not terminate before all threads are joined.

This commit is contained in:
tastytea 2019-10-30 06:54:40 +01:00
parent 6b5a6c4b85
commit e8f0156296
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 7 additions and 6 deletions

View File

@ -87,12 +87,6 @@ int App::main(const std::vector<std::string> &args)
}
html_extract page = uri.get();
if (!page)
{
cerr << "Error: Could not fetch page.\n";
cerr << page.error << endl;
return 3;
}
if (_archive)
{
@ -103,6 +97,13 @@ int App::main(const std::vector<std::string> &args)
}
}
if (!page)
{
cerr << "Error: Could not fetch page.\n";
cerr << page.error << endl;
return 3;
}
db.store({_uri, archive_data.uri, system_clock::now(), _tags,
page.title, page.description, page.fulltext});
}