fix on cm (connectin not closed somehow) and refactor isEnterKey

This commit is contained in:
open-trade
2022-02-09 16:06:44 +08:00
parent d313fa92e1
commit 4945605009
9 changed files with 49 additions and 27 deletions

View File

@@ -335,6 +335,7 @@ impl Connection {
let _ = crate::platform::block_input(false);
crate::platform::toggle_blank_screen(false);
log::info!("#{} connection loop exited", id);
}
fn handle_input(receiver: std_mpsc::Receiver<MessageInput>, tx: Sender) {
@@ -933,7 +934,10 @@ impl Connection {
}
}
Some(misc::Union::video_received(_)) => {
video_service::notify_video_frame_feched(self.inner.id, Some(Instant::now().into()));
video_service::notify_video_frame_feched(
self.inner.id,
Some(Instant::now().into()),
);
}
_ => {}
},
@@ -1039,6 +1043,7 @@ impl Connection {
crate::platform::lock_screen();
super::video_service::switch_to_primary();
}
self.tx_to_cm.send(ipc::Data::Close).ok();
self.port_forward_socket.take();
}