Fix crash: check joinable() before thread join in end_broadcast
Some checks failed
ci-bundle.yml / Fix crash: check joinable() before thread join in end_broadcast (push) Failing after 0s
ci-copr.yml / Fix crash: check joinable() before thread join in end_broadcast (push) Failing after 0s
ci-homebrew.yml / Fix crash: check joinable() before thread join in end_broadcast (push) Failing after 0s

This commit is contained in:
Joey Yakimowich-Payne 2026-02-11 14:46:56 -07:00
commit a271a63602

View file

@ -1823,13 +1823,13 @@ namespace stream {
audio_packets.reset(); audio_packets.reset();
BOOST_LOG(debug) << "Waiting for main listening thread to end..."sv; BOOST_LOG(debug) << "Waiting for main listening thread to end..."sv;
ctx.recv_thread.join(); if (ctx.recv_thread.joinable()) ctx.recv_thread.join();
BOOST_LOG(debug) << "Waiting for main video thread to end..."sv; BOOST_LOG(debug) << "Waiting for main video thread to end..."sv;
ctx.video_thread.join(); if (ctx.video_thread.joinable()) ctx.video_thread.join();
BOOST_LOG(debug) << "Waiting for main audio thread to end..."sv; BOOST_LOG(debug) << "Waiting for main audio thread to end..."sv;
ctx.audio_thread.join(); if (ctx.audio_thread.joinable()) ctx.audio_thread.join();
BOOST_LOG(debug) << "Waiting for main control thread to end..."sv; BOOST_LOG(debug) << "Waiting for main control thread to end..."sv;
ctx.control_thread.join(); if (ctx.control_thread.joinable()) ctx.control_thread.join();
BOOST_LOG(debug) << "All broadcasting threads ended"sv; BOOST_LOG(debug) << "All broadcasting threads ended"sv;
broadcast_shutdown_event->reset(); broadcast_shutdown_event->reset();