mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
portable-service: add quick_start feature and ci
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -406,8 +406,9 @@ pub mod server {
|
||||
Pong => {
|
||||
nack = 0;
|
||||
}
|
||||
ConnCount(Some(n)) => {
|
||||
if n == 0 {
|
||||
ConnCount(Some(_n)) => {
|
||||
#[cfg(not(feature = "quick_start"))]
|
||||
if _n == 0 {
|
||||
log::info!("Connnection count equals 0, exit");
|
||||
stream.send(&Data::DataPortableService(WillClose)).await.ok();
|
||||
break;
|
||||
@@ -435,6 +436,7 @@ pub mod server {
|
||||
break;
|
||||
}
|
||||
stream.send(&Data::DataPortableService(Ping)).await.ok();
|
||||
#[cfg(not(feature = "quick_start"))]
|
||||
stream.send(&Data::DataPortableService(ConnCount(None))).await.ok();
|
||||
}
|
||||
}
|
||||
@@ -462,6 +464,7 @@ pub mod client {
|
||||
}
|
||||
|
||||
pub(crate) fn start_portable_service() -> ResultType<()> {
|
||||
log::info!("start portable service");
|
||||
if PORTABLE_SERVICE_RUNNING.lock().unwrap().clone() {
|
||||
bail!("already running");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user