Skip to content

Conversation

@bryfox
Copy link
Contributor

@bryfox bryfox commented Oct 1, 2025

This adds catch in a few places to log instead of throwing uncaught errors.

Fixes #1673

The RTCEngine change is prompted by the issue description, and is not awaited per #1673 (comment).

The outOfBandFailureRejectingFuture catch is prompted by a similar setup to this issue, where the promise can be rejected before anything even starts iterating the stream. In this case, I observed an uncaught "Participant ... unexpectedly disconnected in the middle of sending data" on Participant A when Participant B sends and disconnects concurrently. This probably needs a little extra review as it seems more subtle, but I think the approach is valid. I also confirmed it avoided the uncaught errors in my test app.

No tests here as I didn't find any precedent for such.

@changeset-bot
Copy link

changeset-bot bot commented Oct 1, 2025

🦋 Changeset detected

Latest commit: be8ab3c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
livekit-client Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@CLAassistant
Copy link

CLAassistant commented Oct 1, 2025

CLA assistant check
All committers have signed the CLA.


let streamController: ReadableStreamDefaultController<DataStream_Chunk>;
const outOfBandFailureRejectingFuture = new Future<never>();
outOfBandFailureRejectingFuture.promise.catch((err) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@1egoman does this look reasonable to you?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine, it doesn't seem like it interferes with the existing logic, just logs a copy of any errors 👍

@lukasIO
Copy link
Contributor

lukasIO commented Oct 2, 2025

thanks for the contribution!

@lukasIO lukasIO merged commit 3bd1db7 into livekit:main Oct 2, 2025
3 checks passed
@github-actions github-actions bot mentioned this pull request Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Engine may throw uncaught errors

4 participants