diff --git a/src/ui/fortmanager.cpp b/src/ui/fortmanager.cpp index ec2ea051..b628ed33 100644 --- a/src/ui/fortmanager.cpp +++ b/src/ui/fortmanager.cpp @@ -192,12 +192,10 @@ void FortManager::initialize() setupServiceInfoManager(); checkReinstallDriver(); - setupDriver(); - - loadConf(); - - checkDriverOpened(); checkStartService(); + + setupDriver(); + loadConf(); } void FortManager::setupThreadPool() @@ -298,7 +296,7 @@ bool FortManager::installDriver() const bool hasService = IoC()->hasService(); if (hasService) { - StartupUtil::stopService(); + StartupUtil::stopService(/*restarting=*/true); } else { closeDriver(); } @@ -377,18 +375,6 @@ void FortManager::checkReinstallDriver() } } -void FortManager::checkDriverOpened() -{ - if (IoC()->isDeviceOpened()) - return; - - const auto settings = IoC(); - - if (!settings->isService() && canInstallDriver(settings)) { - installDriver(); - } -} - void FortManager::checkStartService() { const auto settings = IoC(); diff --git a/src/ui/fortmanager.h b/src/ui/fortmanager.h index 0851e1b3..0321e725 100644 --- a/src/ui/fortmanager.h +++ b/src/ui/fortmanager.h @@ -50,7 +50,6 @@ private: void checkRemoveDriver(); void checkReinstallDriver(); - void checkDriverOpened(); void checkStartService(); void setupEnvManager();