X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/a500fb72810060e52d87ad2c2e4691531f0bcc5a..1cb912e4f90473f78d2f0f10ab5c9b2c5bd36440:/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; }