From 515af472ce064f674310a6f4175e379aa89173dc Mon Sep 17 00:00:00 2001
From: GyDi <segydi@foxmail.com>
Date: Fri, 14 Oct 2022 14:46:15 +0800
Subject: [PATCH] fix: break loop when core terminated

---
 src-tauri/src/core/service.rs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src-tauri/src/core/service.rs b/src-tauri/src/core/service.rs
index 679c03d..a2ce71e 100644
--- a/src-tauri/src/core/service.rs
+++ b/src-tauri/src/core/service.rs
@@ -172,6 +172,8 @@ impl Service {
             log::error!(target: "app" ,"[clash error]: {}", err);
             write_log(err);
           }
+          CommandEvent::Error(err) => log::error!(target: "app" ,"{err}"),
+          CommandEvent::Terminated(_) => break,
           _ => {}
         }
       }
-- 
GitLab