mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-21 04:01:01 +03:00
refactor
This commit is contained in:
@@ -62,15 +62,18 @@ impl Subscriber for ConnInner {
|
||||
|
||||
#[inline]
|
||||
fn send(&mut self, msg: Arc<Message>) {
|
||||
self.tx.as_mut().map(|tx| {
|
||||
allow_err!(tx.send((Instant::now(), msg)));
|
||||
});
|
||||
}
|
||||
|
||||
fn send_video_frame(&mut self, tm: std::time::Instant, msg: Arc<Message>) {
|
||||
self.tx_video.as_mut().map(|tx| {
|
||||
allow_err!(tx.send((tm.into(), msg)));
|
||||
});
|
||||
match &msg.union {
|
||||
Some(message::Union::video_frame(_)) => {
|
||||
self.tx_video.as_mut().map(|tx| {
|
||||
allow_err!(tx.send((Instant::now(), msg)));
|
||||
});
|
||||
}
|
||||
_ => {
|
||||
self.tx.as_mut().map(|tx| {
|
||||
allow_err!(tx.send((Instant::now(), msg)));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user