mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-31 09:01:04 +03:00
release session stream after close
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -132,6 +132,9 @@ pub fn session_login(id: String, password: String, remember: bool) {
|
||||
|
||||
pub fn session_close(id: String) {
|
||||
if let Some(session) = SESSIONS.read().unwrap().get(&id) {
|
||||
if let Some(stream) = &*session.event_stream.read().unwrap() {
|
||||
stream.add(EventToUI::Event("close".to_owned()));
|
||||
}
|
||||
session.close();
|
||||
}
|
||||
let _ = SESSIONS.write().unwrap().remove(&id);
|
||||
|
||||
Reference in New Issue
Block a user