mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-11 14:11:29 +03:00
patch: fix dead lock in file transfer
Signed-off-by: ClSlaid <cailue@bupt.edu.cn>
This commit is contained in:
@@ -119,19 +119,19 @@ lazy_static::lazy_static! {
|
||||
|
||||
impl ClipboardFile {
|
||||
pub fn is_stopping_allowed(&self) -> bool {
|
||||
match self {
|
||||
matches!(
|
||||
self,
|
||||
ClipboardFile::MonitorReady
|
||||
| ClipboardFile::FormatList { .. }
|
||||
| ClipboardFile::FormatDataRequest { .. } => true,
|
||||
_ => false,
|
||||
}
|
||||
| ClipboardFile::FormatList { .. }
|
||||
| ClipboardFile::FormatDataRequest { .. }
|
||||
)
|
||||
}
|
||||
|
||||
pub fn is_stopping_allowed_from_peer(&self) -> bool {
|
||||
match self {
|
||||
ClipboardFile::MonitorReady | ClipboardFile::FormatList { .. } => true,
|
||||
_ => false,
|
||||
}
|
||||
matches!(
|
||||
self,
|
||||
ClipboardFile::MonitorReady | ClipboardFile::FormatList { .. }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user