patch: update UI, clear previous FUSE

- UI updated, now allow copy and paste file in Linux
- Too hard to implement graceful shutdown for rustdesk, just clear
  previously mounted FUSE should also works

Signed-off-by: ClSlaid <cailue@bupt.edu.cn>
This commit is contained in:
ClSlaid
2023-10-07 17:26:20 +08:00
parent d2a5edda46
commit a597c3f835
11 changed files with 81 additions and 22 deletions

View File

@@ -126,6 +126,11 @@ impl CliprdrTxnDispatcher {
self.txn_handler
.insert((conn_id, stream_id.copied()), req.clone());
log::debug!(
"send request to conn_id={}, stream_id={:?}",
conn_id,
stream_id
);
crate::send_data(conn_id, request);
req
}
@@ -137,6 +142,7 @@ impl CliprdrTxnDispatcher {
_ => unreachable!(),
};
let key = (conn_id, stream_id.cloned());
log::debug!("recv response for {:?}", key);
match self.txn_handler.remove(&key) {
Some((_, tx)) => tx.set(response),
None => log::warn!("no request found for {:?}", key),
@@ -570,17 +576,19 @@ impl FuseServer {
fn gc_files(&self) {
{
let mut status = self.status.write();
// really update only when:
// running: Active
if *status != Status::Active {
return;
}
// received update after fetching complete
// should fetch again
if *status == Status::Building {
*status = Status::GcComplete;
return;
}
// really update only when:
// running: Active
if *status != Status::Active {
return;
}
*status = Status::Gc;
}