fix(skill): close watchers after probe disposal

This commit is contained in:
Tianyi Cui
2026-07-29 22:13:57 +08:00
parent d10dde430c
commit c10c72837b
2 changed files with 62 additions and 0 deletions

View File

@@ -489,6 +489,10 @@ class SkillWatchManager {
let ready = false
const readiness = Promise.withResolvers<undefined>()
const signal = this.lifecycle.signal
if (signal.aborted) {
await this.closeWatcher(handle)
signal.throwIfAborted()
}
const onAbort = (): void => { readiness.reject(signal.reason) }
signal.addEventListener('abort', onAbort, { once: true })
const onError = (error: unknown): void => {