use official async trait (#6765)

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-12-29 16:41:49 +08:00
committed by GitHub
parent 6953efc2d8
commit e873188775
6 changed files with 3 additions and 9 deletions

View File

@@ -741,10 +741,11 @@ fn try_broadcast_display_changed(
) {
log::info!("Display {} changed", display);
if let Some(msg_out) = make_display_changed_msg(display_idx, Some(display)) {
sp.send(msg_out.clone());
let msg_out = Arc::new(msg_out);
sp.send_shared(msg_out.clone());
// switch display may occur before the first video frame, add snapshot to send to new subscribers
sp.snapshot(move |sps| {
sps.send(msg_out.clone());
sps.send_shared(msg_out.clone());
Ok(())
})?;
bail!("SWITCH");