X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/a500fb72810060e52d87ad2c2e4691531f0bcc5a..38f134e6a96c08fdd7d4ed07ca3550e8434d56e9:/projects/stargazer/traffcounter_impl.cpp?ds=sidebyside diff --git a/projects/stargazer/traffcounter_impl.cpp b/projects/stargazer/traffcounter_impl.cpp index e61be966..9b0fd966 100644 --- a/projects/stargazer/traffcounter_impl.cpp +++ b/projects/stargazer/traffcounter_impl.cpp @@ -128,9 +128,7 @@ users->CloseSearch(h); //5 seconds to thread stops itself struct timespec ts = {0, 200000000}; for (int i = 0; i < 25 && !stopped; i++) - { nanosleep(&ts, NULL); - } if (!stopped) { @@ -138,6 +136,8 @@ if (!stopped) return -1; } +m_thread.join(); + printfd(__FILE__, "TraffCounter::Stop()\n"); return 0;