Notify viewers when channels close and refresh resumed playback state

This commit is contained in:
evgeny committed 2026-10-12 22:18:04 +02:00
1 parent 4e1c36955a
commit 6e596f34a5
3 files changed
+5 -4

No files matched your search

+1 -1
View File
@@ -155,7 +155,7 @@ bool gui_stream_attach(UTUN_INSTANCE* inst) {
void gui_stream_detach(UTUN_INSTANCE* inst) {
std::lock_guard<std::mutex> guard(bridge.lock);
if (bridge.inst != inst) return;
if (!inst || bridge.inst != inst) return;
if (bridge.pending) uasync_cancel_post(inst->ua, bridge.pending);
bridge.pending = nullptr; stream_set_event_callback(inst, nullptr, nullptr);
if (bridge.viewer.id) closeViewer(StreamRecordKind::Closed, STREAM_CLOSE_SERVICE);