From acff6d043218b1dbaa52c1cdc56836e3dbb84924 Mon Sep 17 00:00:00 2001
From: GyDi <segydi@foxmail.com>
Date: Fri, 28 Oct 2022 01:33:21 +0800
Subject: [PATCH] fix: init system proxy correctly

---
 src-tauri/src/core/sysopt.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src-tauri/src/core/sysopt.rs b/src-tauri/src/core/sysopt.rs
index dacd057..d2a5e4f 100644
--- a/src-tauri/src/core/sysopt.rs
+++ b/src-tauri/src/core/sysopt.rs
@@ -75,7 +75,7 @@ impl Sysopt {
 
   /// update the system proxy
   pub fn update_sysproxy(&mut self) -> Result<()> {
-    if self.cur_sysproxy.is_none() {
+    if self.cur_sysproxy.is_none() || self.old_sysproxy.is_none() {
       return self.init_sysproxy();
     }
 
-- 
GitLab