Do not terminate before all threads are joined.
This commit is contained in:
parent
6b5a6c4b85
commit
e8f0156296
|
@ -87,12 +87,6 @@ int App::main(const std::vector<std::string> &args)
|
||||||
}
|
}
|
||||||
|
|
||||||
html_extract page = uri.get();
|
html_extract page = uri.get();
|
||||||
if (!page)
|
|
||||||
{
|
|
||||||
cerr << "Error: Could not fetch page.\n";
|
|
||||||
cerr << page.error << endl;
|
|
||||||
return 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_archive)
|
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,
|
db.store({_uri, archive_data.uri, system_clock::now(), _tags,
|
||||||
page.title, page.description, page.fulltext});
|
page.title, page.description, page.fulltext});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue