mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-04 14:22:11 +08:00
fix(service): stop waiting on a service that no longer starts with Windows
When the service's start type was changed from automatic, startup waited about two minutes for it before falling back to Sidecar. Detect this immediately, skip the TUN readiness wait, and offer a reinstall that restores automatic start. Refs #8129
This commit is contained in:
@@ -27,7 +27,7 @@ import getSystem from '@/utils/get-system'
|
||||
type Remedy = 'installAndRestart' | 'reinstallAndRestart' | 'restartOnly'
|
||||
|
||||
const remedyFor = (reason: ServiceRequestReason): Remedy =>
|
||||
reason === 'serviceLocationRefused'
|
||||
reason === 'serviceLocationRefused' || reason === 'serviceNotAutoStarted'
|
||||
? 'reinstallAndRestart'
|
||||
: reason === 'sysproxySidecarReady'
|
||||
? 'restartOnly'
|
||||
@@ -40,6 +40,8 @@ const EXPLANATION = {
|
||||
tunNeedsService: 'layout.components.sysproxyPrivilege.tunMessage',
|
||||
serviceLocationRefused:
|
||||
'layout.components.serviceMigration.locationRefusedMessage',
|
||||
serviceNotAutoStarted:
|
||||
'layout.components.serviceMigration.notAutoStartedMessage',
|
||||
} as const
|
||||
|
||||
const TITLE = {
|
||||
@@ -47,6 +49,7 @@ const TITLE = {
|
||||
sysproxySidecarReady: 'layout.components.sysproxyPrivilege.title',
|
||||
tunNeedsService: 'layout.components.sysproxyPrivilege.tunTitle',
|
||||
serviceLocationRefused: 'layout.components.serviceMigration.repair',
|
||||
serviceNotAutoStarted: 'layout.components.serviceMigration.repair',
|
||||
} as const
|
||||
|
||||
const stateToRestore = (
|
||||
|
||||
Reference in New Issue
Block a user