fix(audio): replace Mutex unwrap with poisoned-mutex recovery (TODO-006)

Replace 42 .lock().unwrap() calls with .unwrap_or_else(|e| e.into_inner())
across 7 files. Poisoned mutex recovery prevents panics in realtime audio
callbacks. Add SAFETY comment to WebRtcFallbackVad Send impl (TODO-007).
This commit is contained in:
Edison Jwa
2026-06-11 09:46:51 +09:00
parent 13c7648a65
commit b20e6b663a
7 changed files with 48 additions and 45 deletions
+2 -2
View File
@@ -82,7 +82,7 @@ struct RecordingLayer {
impl RecordingLayer {
fn snapshot(&self) -> Vec<Captured> {
self.records.lock().unwrap().clone()
self.records.lock().unwrap_or_else(|e| e.into_inner()).clone()
}
}
@@ -118,7 +118,7 @@ where
target: event.metadata().target().to_string(),
field_names: names.0,
};
self.records.lock().unwrap().push(captured);
self.records.lock().unwrap_or_else(|e| e.into_inner()).push(captured);
}
}