From 78ae5f3036f82ad4687665dd3476a3ac840a47f4 Mon Sep 17 00:00:00 2001 From: lubeilin <1791778603@qq.com> Date: Sun, 28 May 2023 20:33:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BB=E5=8F=96=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- switch-desktop/src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/switch-desktop/src/main.rs b/switch-desktop/src/main.rs index 0ce4577..97784da 100644 --- a/switch-desktop/src/main.rs +++ b/switch-desktop/src/main.rs @@ -108,6 +108,7 @@ pub struct StartArgs { out_ip:Option>, /// 读取配置文件 --config config_file_path /// Read configuration file + #[arg(long)] config:Option, } @@ -211,7 +212,7 @@ pub fn console_listen(switch: &Switch) { if let Err(e) = switch.stop() { log::error!("stop:{:?}", e); } - std::thread::sleep(std::time::Duration::from_secs(1)); + thread::sleep(Duration::from_secs(1)); break; } }