diff options
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index 88b56cd..3c8f5e7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -114,10 +114,14 @@ int main(int argc, char *argv[]) { client.run(); - std::thread timer_thread(bot::create_timer_thread, &client, &cfg); - timer_thread.join(); + std::vector<std::thread> threads; + threads.push_back(std::thread(bot::create_timer_thread, &client, &cfg)); + threads.push_back(std::thread(&bot::stream::StreamListenerClient::run, + &stream_listener_client)); - stream_listener_client.run_thread(); + for (auto &thread : threads) { + thread.join(); + } return 0; } |
