File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
120120 if let xx = x. object ( forKey: " launch_fail_times " ) as? Int { launch_fail_times = xx }
121121 launch_fail_times += 1
122122 x. set ( launch_fail_times, forKey: " launch_fail_times " )
123- if launch_fail_times > 1 {
123+ if launch_fail_times > 3 {
124124 //发生连续崩溃
125125 let path = ( NSHomeDirectory ( ) as NSString ) . appendingPathComponent ( " /.config/clash/ " )
126126 let documentDirectory = URL ( fileURLWithPath: path)
@@ -159,7 +159,9 @@ class AppDelegate: NSObject, NSApplicationDelegate {
159159 run ( )
160160 }
161161 syncConfig ( ) {
162- self . resetTrafficMonitor ( )
162+ DispatchQueue . main. asyncAfter ( deadline: DispatchTime . now ( ) + 1 , execute: {
163+ self . resetTrafficMonitor ( )
164+ } )
163165 }
164166 }
165167
You can’t perform that action at this time.
0 commit comments