Skip to content

Commit

Permalink
Merge pull request #3 from deco-cx/feat/send-close-signal-to-out
Browse files Browse the repository at this point in the history
fix: send out signal
  • Loading branch information
tlgimenes authored Aug 5, 2024
2 parents 0efc95e + c795751 commit a9596f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ export interface Channel<T> {
export const link = (...signals: AbortSignal[]): AbortSignal => {
const ctrl = new AbortController();
for (const signal of signals) {
signal.onabort = (evt) => {
signal.addEventListener("abort", (evt) => {
if (!ctrl.signal.aborted) {
ctrl.abort(evt);
}
};
});
}
return ctrl.signal;
};
Expand Down

0 comments on commit a9596f2

Please sign in to comment.