fix lsp diagnostic accurancy

This commit is contained in:
Dax Raad
2025-06-30 22:46:42 -04:00
parent fea56d8de6
commit de15e67834
8 changed files with 299 additions and 104 deletions

View File

@@ -96,13 +96,16 @@ export namespace App {
}
return ctx.provide(app, async () => {
const result = await cb(app.info)
for (const [key, entry] of app.services.entries()) {
if (!entry.shutdown) continue
log.info("shutdown", { name: key })
await entry.shutdown?.(await entry.state)
try {
const result = await cb(app.info)
return result
} finally {
for (const [key, entry] of app.services.entries()) {
if (!entry.shutdown) continue
log.info("shutdown", { name: key })
await entry.shutdown?.(await entry.state)
}
}
return result
})
}