mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
refactor
This commit is contained in:
@@ -263,12 +263,16 @@ async fn handle(data: Data, stream: &mut Connection) {
|
||||
Some(value) => {
|
||||
let v0 = Config::get_option("stop-service");
|
||||
let v1 = Config::get_rendezvous_servers();
|
||||
let v2 = Config::get_option("audio-input");
|
||||
Config::set_options(value);
|
||||
if v0 != Config::get_option("stop-service")
|
||||
|| v1 != Config::get_rendezvous_servers()
|
||||
{
|
||||
RendezvousMediator::restart();
|
||||
}
|
||||
if v2 != Config::get_option("audio-input") {
|
||||
crate::audio_service::restart();
|
||||
}
|
||||
allow_err!(stream.send(&Data::Options(None)).await);
|
||||
}
|
||||
},
|
||||
@@ -515,10 +519,6 @@ pub fn set_option(key: &str, value: &str) {
|
||||
set_options(options).ok();
|
||||
}
|
||||
|
||||
pub fn restart_autdio_service() {
|
||||
crate::audio_service::restart();
|
||||
}
|
||||
|
||||
#[tokio::main(flavor = "current_thread")]
|
||||
pub async fn set_options(value: HashMap<String, String>) -> ResultType<()> {
|
||||
let mut c = connect(1000, "").await?;
|
||||
|
||||
Reference in New Issue
Block a user