From f4918c5322b4b579373116d8a5d10f6e2257ebd6 Mon Sep 17 00:00:00 2001 From: Markus Date: Tue, 8 Oct 2019 18:56:53 +0200 Subject: [PATCH] fix error: stop when season is finished, but doesn't wait for threads --- parameterManager.h | 2 +- programManager.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/parameterManager.h b/parameterManager.h index 3441e6d..eae957f 100644 --- a/parameterManager.h +++ b/parameterManager.h @@ -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 = "", diff --git a/programManager.cpp b/programManager.cpp index 84ea77b..b4d3680 100644 --- a/programManager.cpp +++ b/programManager.cpp @@ -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;