Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2022-12-26 22:18:34 +08:00
parent 0d0957cea5
commit 0e4935592d
3 changed files with 5 additions and 22 deletions

View File

@@ -107,7 +107,6 @@ impl<T: InvokeUiSession> Remote<T> {
SERVER_CLIPBOARD_ENABLED.store(true, Ordering::SeqCst);
SERVER_FILE_TRANSFER_ENABLED.store(true, Ordering::SeqCst);
self.handler.set_connection_type(peer.is_secured(), direct); // flutter -> connection_ready
self.handler.set_connection_info(direct, false);
// just build for now
#[cfg(not(windows))]
@@ -145,10 +144,7 @@ impl<T: InvokeUiSession> Remote<T> {
}
Ok(ref bytes) => {
last_recv_time = Instant::now();
if !received {
received = true;
self.handler.set_connection_info(direct, true);
}
received = true;
self.data_count.fetch_add(bytes.len(), Ordering::Relaxed);
if !self.handle_msg_from_peer(bytes, &mut peer).await {
break