Skip to content

Commit

Permalink
chore(notifier): Clarify makeEachIterator rejection suppression
Browse files Browse the repository at this point in the history
  • Loading branch information
gibson042 authored Apr 25, 2023
1 parent 752b08b commit 2ec199f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/notifier/src/subscribe.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ const makeEachIterator = (topic, nextCellP) => {
// with an eager consumer that doesn't wait for results to settle.
nextCellP = reconnectAsNeeded(getSuccessor, [tailP]);

// We expect the tail to be the "cannot read past end" error at the end
// of the happy path.
// Since we are wrapping that error with eventual send, we sink the
// rejections here too to avoid invalid unhandled rejection issues later.
// Avoid unhandled rejection warnings here if the previous cell was rejected or
// there is no further request of this iterator.
// `tailP` is handled inside `reconnectAsNeeded` and `resultP` is the caller's
// concern, leaving only `publishCountP` and the new `nextCellP`.
void E.when(publishCountP, sink, sink);
void E.when(nextCellP, sink, sink);
return resultP;
Expand Down

0 comments on commit 2ec199f

Please sign in to comment.