Bump : 0.5.4 : WHIP cleanup guarded by session id, stale detach task can't kill a newer stream on the same key
This commit is contained in:
@@ -12,6 +12,7 @@ use tokio::{
|
||||
sync::mpsc::{self, Receiver},
|
||||
};
|
||||
use tracing::{debug, error, info, trace, warn};
|
||||
use uuid::Uuid;
|
||||
|
||||
pub struct WebRtcProxyConfig {
|
||||
pub proxy_port: i32,
|
||||
@@ -24,9 +25,10 @@ pub struct WebrtcProxy {
|
||||
socket: Arc<UdpSocket>,
|
||||
public_addr: SocketAddr,
|
||||
/// Trickle-ICE candidate channels for WHIP ingest.
|
||||
/// Keyed by stream_key_id; sender stored here so PATCH handler
|
||||
/// can forward candidates to the detach task.
|
||||
pub trickle_tx: Arc<DashMap<i32, tokio::sync::mpsc::UnboundedSender<String>>>,
|
||||
/// Keyed by stream_key_id; each entry is tagged with the owning session's
|
||||
/// id so cleanup can remove only its own entry and never a newer session
|
||||
/// that re-published on the same key.
|
||||
pub trickle_tx: Arc<DashMap<i32, (Uuid, tokio::sync::mpsc::UnboundedSender<String>)>>,
|
||||
}
|
||||
|
||||
const STUN_MAGIC: u32 = 0x2112A442;
|
||||
|
||||
Reference in New Issue
Block a user