fix(core): Resolve AbortSignal MaxListenersExceededWarning (#5950) (#16735)

This commit is contained in:
Spencer
2026-01-22 20:16:00 +00:00
committed by GitHub
parent e2ddaedab4
commit 5d68d8cda5
5 changed files with 41 additions and 20 deletions
@@ -346,12 +346,16 @@ describe('SessionSummaryService', () => {
10000,
);
abortSignal?.addEventListener('abort', () => {
clearTimeout(timeoutId);
const abortError = new Error('This operation was aborted');
abortError.name = 'AbortError';
reject(abortError);
});
abortSignal?.addEventListener(
'abort',
() => {
clearTimeout(timeoutId);
const abortError = new Error('This operation was aborted');
abortError.name = 'AbortError';
reject(abortError);
},
{ once: true },
);
}),
);