-
Notifications
You must be signed in to change notification settings - Fork 19
Description
Problem/Opportunity
The following description is based on the file listener.js
When there is a single listener of a type (defined by listener_id), the call to unregister happens as expected
After the splice call, the array for this listener is empty

Then the if resolves as expected and the call to unregister happens successfully

However when there are multiple listeners for the listener type, the if condition resolves to false and the call to unregister does not happen as expected
Listener removed out of array leaving the other listeners in place after splice call is made

But then the if condition resolves to false and the call to unregister does not happen as expected
Steps to reproduce
- Ensure the thunderjs server has a listener to connect to
- Connect to the listener with mutliple listeners (2 atleast)
- Perform dispose call of one of the listeners
- Notice that although listener's dispose function gets executed, the call to unregister in network tab is never seen (on browser)
Expected Behavior
The call to dispose of a listener should always unregister, regardless if the number of listeners in the array of listeners for a given listener_id
Actual Behavior
The listener gets removed from the array of listeners however the network call to truly unregister for the given listener does not get made
Notes (Optional)
No response