Skip to content

Commit

Permalink
fix: Abort download causing instance always launching
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed May 12, 2024
1 parent 3301c4c commit 984c20a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion xmcl-keystone-ui/src/composables/instanceVersionDiagnose.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ export function useInstanceVersionDiagnose(path: Ref<string>, runtime: Ref<Runti
if (!version) return
abortController.abort()
abortController = new AbortController()
loading.value = true
abortController.signal.addEventListener('abort', () => {
loading.value = false
})
try {
loading.value = true
await lock.read(() => update(version))
} finally {
loading.value = false
Expand Down

0 comments on commit 984c20a

Please sign in to comment.