(isRestartSelf: boolean = false)
| 230 | } |
| 231 | |
| 232 | async function exit(isRestartSelf: boolean = false) { |
| 233 | componentWatchdogStopping = true |
| 234 | if (componentWatchdogTimer) { |
| 235 | clearInterval(componentWatchdogTimer) |
| 236 | componentWatchdogTimer = undefined |
| 237 | } |
| 238 | try { |
| 239 | await saveNmConfig() |
| 240 | await stopRclone() |
| 241 | await stopOpenlist() |
| 242 | await saveNmConfig() |
| 243 | } finally { |
| 244 | if (isRestartSelf) { |
| 245 | //await restartSelf() |
| 246 | location.reload() |
| 247 | } else { |
| 248 | await tauriExit(0) |
| 249 | } |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | function startComponentWatchdog() { |
| 254 | componentWatchdogStopping = false |
no test coverage detected