Skip to content
This repository was archived by the owner on Jul 12, 2023. It is now read-only.

Fix for invalid subscriptions #3

Merged
merged 1 commit into from
Feb 15, 2021
Merged

Fix for invalid subscriptions #3

merged 1 commit into from
Feb 15, 2021

Conversation

stasee
Copy link
Contributor

@stasee stasee commented Dec 5, 2016

When releasing a MediaObject, for example a PlayerEndpoint, there is no subscription on the server,
but the removeListener is called for 'EndOfStream'.
The subscriptions['EndOfStream'] does not exist and the token is invalid.
This fix prevents that the invalid 'token' is used, and that an Exception is raised.

there is no subscription on the server,
but the removeListener is called for 'EndOfStream'.
The subscriptions['EndOfStream'] does not exist and the token is invalid.
This fix prevents that the invalid 'token' is used.
@j1elo j1elo self-assigned this Apr 9, 2019
@davidengelmaier
Copy link

davidengelmaier commented May 22, 2019

This issue is based on a false assumption that the EventEmitter.listenerCount for the event will be 0 when the removeListener event is emitted, that is however not 100% sure as described in the documentation at https://www.tutorialspoint.com/nodejs/nodejs_event_emitter.htm:

This event is emitted any time someone removes a listener. When this event is triggered, the listener may not yet have been removed from the array of listeners for the event.

@jenkinskurento
Copy link
Contributor

Hi there, thanks for your Pull Request!

A Kurento member needs to verify that this patch is reasonable to test. In case it is, they should write a comment with the phrase test this please. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by Kurento members will still work. Regular contributors can be whitelisted to skip this step.

@j1elo j1elo merged commit 5691e7b into Kurento:master Feb 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants