Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/rsc-runtime/src/state/sqlite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -849,9 +849,13 @@ export const createSqliteStateDriver = (options: SqliteStateDriverOptions): Agen
const close = sqliteEffect(definition.id, 'close database', () => {
db.close();
}, true);
// Release finalizers are infallible by contract: a close failure
// on the success path surfaces as a defect instead of being
// silently swallowed, while a failing path keeps the original
// failure as the cause.
return Exit.isFailure(exit)
? close.pipe(Effect.catch(() => Effect.void))
: close;
: close.pipe(Effect.orDie);
},
);
const runtime = makeScopedEffectRuntime(
Expand Down
Loading