-
Notifications
You must be signed in to change notification settings - Fork 115
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
Listener remotedeviceready not removed when peer disconnects #375
Comments
Do you have a quick example you can provide? |
Yep, in runtime.js in the 'observe' method, there are two places where the listener is created:
But that listener is never removed, even if the peer disconnects. Then if the same peer reconnects, a new listener is registered. The listeners just keep building up. I tested moving the listener function out to a function named 'matchDevice' and then subscribing to a disconnect:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Listeners on 'remotedeviceready' are never removed when the initiating peer disconnects, causing memory leak. MaxListenersExceededWarning issued after default 10 listeners are enabled.
Somewhat related to #294 and could be fixed at the same time as that.
The text was updated successfully, but these errors were encountered: