Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix raised hand handler not detached when peer is destroyed #5675

Merged

Conversation

danxuliu
Copy link
Member

This fixes a memory leak, as the reference to the Peer object was retained forever by the webrtc object.

How to test

  • Add console.log('Handling raised hand') as the first line inside _handleRaisedHand
  • Start a call
  • Open the browser console
  • Open the conversation in a private window (all the following steps should be done in the private window)
  • Join the call
  • Leave the call
  • Join the call
  • Leave the call
  • Join the call
  • Raise the hand

Result with this pull request

In the original window a single Handling raised hand message is printed in the console

Result without this pull request

In the original window three Handling raised hand messages are printed in the console

This fixes a memory leak, as the reference to the Peer object was
retained forever by the webrtc object.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu
Copy link
Member Author

/backport to stable21.1

@danxuliu
Copy link
Member Author

/backport to stable21

Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

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

👍 nice catch

@PVince81 PVince81 merged commit 24f30c0 into master May 28, 2021
@PVince81 PVince81 deleted the fix-raised-hand-handler-not-detached-when-peer-is-destroyed branch May 28, 2021 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants