MCPcopy Create free account
hub / github.com/VirtualHotBar/NetMount / exit

Function exit

src/controller/main.ts:232–251  ·  view source on GitHub ↗
(isRestartSelf: boolean = false)

Source from the content-addressed store, hash-verified

230}
231
232async 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
253function startComponentWatchdog() {
254 componentWatchdogStopping = false

Callers 5

Mount_pageFunction · 0.90
Setting_pageFunction · 0.90
TestFunction · 0.90
check_res_binFunction · 0.85
mainFunction · 0.85

Calls 3

saveNmConfigFunction · 0.90
stopRcloneFunction · 0.90
stopOpenlistFunction · 0.90

Tested by

no test coverage detected