fix error: stop when season is finished, but doesn't wait for threads

This commit is contained in:
Markus 2019-10-08 18:56:53 +02:00
parent b6fe7c8497
commit f4918c5322
2 changed files with 4 additions and 1 deletions

View File

@ -50,7 +50,7 @@ struct Settings {
proxy_ip = "127.0.0.1",
languages = "GerDub,GerSub,Eng",
genaueHoster = "",
version = "3.0.4",
version = "3.0.5",
defaultFileVersion="1.6",
outputFilePath = "",
default_checkPath = "",

View File

@ -275,6 +275,9 @@ int ProgramManager::defaultModus(Settings *settings)
for (int staffel = settings->startSeason; staffel <= maxStaffel; ++staffel) {
//Test for stopping Program caused -E, -S
if(staffel > settings->stopSeason && settings->stopSeason > 0) {
if(settings->maxThreads != 0)
if(waitForThreads() != 0)
return 261;
if(settings->debugMode)
std::cout << " > Stoppe, weil Staffel: " << staffel << " > StopStaffel " << settings->stopSeason << std::endl;
std::cout << " > Fertig, da Staffel " << staffel << " größer ist als StopStaffel " << settings->stopSeason << std::endl;