fix(core): harden UDP session handling, QUIC control message validation, and bridge process cleanup
This commit is contained in:
@@ -1374,8 +1374,15 @@ async fn handle_edge_connection_quic(
|
||||
let dgram_edge_id = edge_id.clone();
|
||||
let dgram_token = edge_token.clone();
|
||||
let dgram_handle = tokio::spawn(async move {
|
||||
let mut cleanup_interval = tokio::time::interval(Duration::from_secs(30));
|
||||
cleanup_interval.tick().await; // consume initial tick
|
||||
loop {
|
||||
tokio::select! {
|
||||
// Periodic sweep: prune sessions whose task has exited (receiver dropped)
|
||||
_ = cleanup_interval.tick() => {
|
||||
let mut s = dgram_sessions.lock().await;
|
||||
s.retain(|_id, tx| !tx.is_closed());
|
||||
}
|
||||
datagram = dgram_conn.read_datagram() => {
|
||||
match datagram {
|
||||
Ok(data) => {
|
||||
|
||||
Reference in New Issue
Block a user