X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/a500fb72810060e52d87ad2c2e4691531f0bcc5a..f4333737c7e347efe9258ccf85c1237e03be619c:/projects/stargazer/plugins/configuration/sgconfig/stgconfig.cpp diff --git a/projects/stargazer/plugins/configuration/sgconfig/stgconfig.cpp b/projects/stargazer/plugins/configuration/sgconfig/stgconfig.cpp index a63478bd..4666575c 100644 --- a/projects/stargazer/plugins/configuration/sgconfig/stgconfig.cpp +++ b/projects/stargazer/plugins/configuration/sgconfig/stgconfig.cpp @@ -102,7 +102,7 @@ int STG_CONFIG::Start() return -1; } - m_thread = std::jthread([this](auto token){ Run(token); }); + m_thread = std::jthread([this](auto token){ Run(std::move(token)); }); return 0; } @@ -127,6 +127,8 @@ int STG_CONFIG::Stop() if (isRunning) m_thread.detach(); + else + m_thread.join(); return 0; }