Skip to content

Commit 69ff4ad

Browse files
authored
fix(context): check ctx status in abort listener (#94)
1 parent d5ed9d3 commit 69ff4ad

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib/context.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ export class AppContext {
115115
);
116116

117117
params.parentContext.abortSignal.addEventListener('abort', () => {
118-
this.end();
118+
if (!this.abortSignal.aborted) {
119+
this.end();
120+
}
119121
});
120122

121123
if (this.isTracingEnabled(this.tracer)) {

0 commit comments

Comments
 (0)