Open-EO / openeo-js-client

JavaScript and TypeScript client for the openEO API.
https://open-eo.github.io/openeo-js-client/latest/
Apache License 2.0
15 stars 6 forks source link

Prevent overriding of listeners (fixes #5) #7

Closed christophfriedrich closed 5 years ago

christophfriedrich commented 5 years ago

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.

m-mohr commented 5 years ago

Thanks.