X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/479b8853c2ab18c98926a9369a03888021e9b986..73bee151e048054bde9a39c5ad2efec25af9c77b:/projects/stargazer/main.cpp?ds=inline diff --git a/projects/stargazer/main.cpp b/projects/stargazer/main.cpp index bcf7af77..ee14c3a8 100644 --- a/projects/stargazer/main.cpp +++ b/projects/stargazer/main.cpp @@ -29,7 +29,7 @@ #include "traffcounter_impl.h" #include "settings_impl.h" #include "pidfile.h" -#include "eventloop.h" +#include "async_pool.h" #include "stg_timer.h" #include "stg/user.h" @@ -282,7 +282,7 @@ int main(int argc, char* argv[]) return -1; } - auto& loop = EVENT_LOOP::instance(); + STG::AsyncPoolST::start(); StoreLoader storeLoader(settings); if (storeLoader.load()) @@ -292,13 +292,6 @@ int main(int argc, char* argv[]) return -1; } - if (loop.Start()) - { - printfd(__FILE__, "Event loop not started.\n"); - WriteServLog("Event loop not started."); - return -1; - } - auto& store = storeLoader.get(); WriteServLog("Storage plugin: %s. Loading successfull.", store.GetVersion().c_str()); @@ -377,8 +370,7 @@ int main(int argc, char* argv[]) manager.stop(); - if (loop.Stop()) - WriteServLog("Event loop not stopped."); + STG::AsyncPoolST::stop(); if (!traffCnt.Stop()) WriteServLog("Traffcounter: Stop successfull.");