mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-28 15:49:04 +08:00
Merge pull request #5884 from fufesou/fix/sciter_reconnect_state
fix, sciter, reconnect, check thread running before the state
This commit is contained in:
commit
b02f169764
@ -888,10 +888,12 @@ impl<T: InvokeUiSession> Session<T> {
|
||||
// 2. If the connection is established, send `Data::Close`.
|
||||
// 3. If the connection is disconnected, do nothing.
|
||||
let mut connection_round_state_lock = self.connection_round_state.lock().unwrap();
|
||||
match connection_round_state_lock.state {
|
||||
ConnectionState::Connecting => return,
|
||||
ConnectionState::Connected => self.send(Data::Close),
|
||||
ConnectionState::Disconnected => {}
|
||||
if self.thread.lock().unwrap().is_some() {
|
||||
match connection_round_state_lock.state {
|
||||
ConnectionState::Connecting => return,
|
||||
ConnectionState::Connected => self.send(Data::Close),
|
||||
ConnectionState::Disconnected => {}
|
||||
}
|
||||
}
|
||||
let round = connection_round_state_lock.new_round();
|
||||
drop(connection_round_state_lock);
|
||||
|
Loading…
Reference in New Issue
Block a user