Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dgw): send close code 1005 when video streaming ends #1186

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions crates/video-streamer/src/streamer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ pub(crate) mod signal_writer;
pub(crate) mod tag_writers;

use crate::{reopenable::Reopenable, StreamingConfig};
use tokio::io::AsyncWriteExt;
irvingoujAtDevolution marked this conversation as resolved.
Show resolved Hide resolved

#[instrument(skip_all)]
pub fn webm_stream(
Expand Down Expand Up @@ -226,6 +227,7 @@ fn spawn_sending_task<W>(
},
}
}
let _ = ws_frame.lock().await.get_mut().shutdown().await;
Ok::<_, anyhow::Error>(())
});

Expand All @@ -249,6 +251,7 @@ fn spawn_sending_task<W>(
}
}
info!("Stopping streaming task");
let _ = ws_frame_clone.lock().await.get_mut().shutdown().await;
handle.abort();
stop_notifier.notify_waiters();
Ok::<_, anyhow::Error>(())
Expand Down
Loading