-
-
Notifications
You must be signed in to change notification settings - Fork 65
Incoming DataChannels do not always close which leaks memory #349
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
Comments
I can confirm this. |
@murat-dogan @paullouisageneau do you have any thoughts on this? |
Hi @achingbrain , I will take a look this weekend. |
Here are the referenced issues that may be relevant: mertushka/haxball.js#49 Also, the |
Thank you @achingbrain for the example code. It seems there is a race condition in libdatachannel. Could you please also test it? Maybe we can create a folder in the test part, to save @achingbrain code for future reference and testing. |
Looks like @paullouisageneau merged your PR, I'll wait for it to be released before spending more time here. As a side benefit if he performs a release it will mean we can finally land #256. It would be nice to get that in before the PR celebrates it's first birthday. |
Uh oh!
There was an error while loading. Please reload this page.
I've noticed that sometimes incoming DataChannels do not always emit a
close
event and/or get garbage collected which leaks memory. It happens when closing PeerConnections with open channels, but also with channels that have been closed explicitly.Here's a reproduction. It creates two
RTCPeerConnection
s and connects them together. One PeerConnection opens a number of channels and sends data over them, the other just echoes any data sent back over any channels that have been opened. When all the data has been sent and received the connections are closed and the event loop should exit.It doesn't happen every time but if you use until-death to run the script repeatedly it'll fail to exit eventually and why-is-node-running will then print the open handles that are stopping node from exiting.
The text was updated successfully, but these errors were encountered: