So far the listeners were saved per topic, so that the second subscription for the same topic overrides the initial subscription's listener. This commit fixes that: listeners are now stored per topic and then again per parameter setting. Also, we now use a Map instead of an object.
Subscriptions without parameters are represented by having the empty object ({}) as their parameter.
This also fixed that sockets were closed although there were still subscriptions left.
So far the listeners were saved per topic, so that the second subscription for the same topic overrides the initial subscription's listener. This commit fixes that: listeners are now stored per topic and then again per parameter setting. Also, we now use a Map instead of an object.
Subscriptions without parameters are represented by having the empty object (
{}
) as their parameter.This also fixed that sockets were closed although there were still subscriptions left.