fixed incorrect merge of branches

This commit is contained in:
lukas 2020-06-08 11:17:08 +02:00
parent a231e6c852
commit 095eb5c0cd

View File

@ -11,8 +11,6 @@
#include <thread>
#include <Logger.h>
using namespace IPRefresher;
bool IPRefresher::checkIPAdress(bool force) {
FileLogger logger;
@ -60,17 +58,14 @@ bool IPRefresher::checkIPAdress(bool force) {
void IPRefresher::startUpService(int interval) {
Logger::message("startup of service");
Logger::message("Version: " + StaticData::VERSION);
if (Config::readConfig()) {
while (true) {
Logger::message("starting check");
if (Config::readConfig()) {
checkIPAdress(false);
} else {
std::cout << "incorrect credentials!" << std::endl;
}
std::this_thread::sleep_for(std::chrono::milliseconds(interval * 1000));
while (true) {
Logger::message("starting check");
if (Config::readConfig()) {
checkIPAdress(false);
} else {
std::cout << "incorrect credentials!" << std::endl;
}
} else {
std::cout << "incorrect credentials!" << std::endl;
std::this_thread::sleep_for(std::chrono::milliseconds(interval * 1000));
}
}