Skip to content

Comments

Add guard against closed peerConnection#788

Open
FloEdelmann wants to merge 2 commits intoEpicGamesExt:masterfrom
FloEdelmann:patch-1
Open

Add guard against closed peerConnection#788
FloEdelmann wants to merge 2 commits intoEpicGamesExt:masterfrom
FloEdelmann:patch-1

Conversation

@FloEdelmann
Copy link
Contributor

Relevant components:

  • Signalling server
  • Common library
  • Frontend library
  • Frontend UI library
  • Matchmaker
  • Platform scripts
  • SFU

Problem statement:

Similar to #719: Fix for throwing error when peerConnection is not defined. We see some events in Sentry where peerConnection has been available at the start of the function, but not anymore in the then callback; the connection must have been closed in the meantime.

Solution

Currently when peerConnection is not defined, the rest of the function is not executed because an error is thrown (null is not an object (evaluating 'this.peerConnection.getReceivers')). Now the error is silenced and the return statement still prevents further execution.

Documentation

N/A

Test Plan and Compatibility

There are no code behavior changes, apart from no error being thrown anymore. The error previously was unhandled because generateStats was called in a window interval (via WebRtcPlayerController.getStats).

@changeset-bot
Copy link

changeset-bot bot commented Feb 20, 2026

🦋 Changeset detected

Latest commit: f148e87

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

This PR includes changesets to release 1 package
Name Type
@epicgames-ps/lib-pixelstreamingfrontend-ue5.7 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

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.

1 participant