X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/8f8c49688664c8681a11ea31f6a810625dcd108b..2574a28cbf000603bc31f61593dbf061ff56c1d5:/projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp?ds=sidebyside diff --git a/projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp b/projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp index 01162875..60d3846c 100644 --- a/projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp +++ b/projects/stargazer/plugins/authorization/inetaccess/inetaccess.cpp @@ -25,7 +25,6 @@ #include "inetaccess.h" #include "stg/common.h" -#include "stg/locker.h" #include "stg/tariff.h" #include "stg/settings.h" @@ -290,7 +289,6 @@ AUTH_IA::AUTH_IA() stgSettings(NULL), listenSocket(-1), enabledDirs(0xFFffFFff), - onDelUserNotifier(*this), logger(STG::PluginLogger::get("auth_ia")) { InitContext("pr7Hhen", 7, &ctxS); @@ -341,12 +339,10 @@ AUTH_IA::~AUTH_IA() //----------------------------------------------------------------------------- int AUTH_IA::Start() { -users->AddNotifierUserDel(&onDelUserNotifier); +m_onDelUserConn = users->onDel([this](auto user){ DelUser(user); }); if (PrepareNet()) - { return -1; - } if (!m_thread.joinable()) m_thread = std::jthread([this](auto token){ Run(std::move(token)); }); @@ -394,7 +390,7 @@ if (isRunningRunTimeouter) } } -users->DelNotifierUserDel(&onDelUserNotifier); +m_onDelUserConn.disconnect(); if (isRunningRun) m_thread.detach();