BoschSmartHome / bosch-shc-api-docs

Bosch Smart Home Controller Local REST API
Other
208 stars 44 forks source link

Unsubscribe from long polling necessary? #52

Closed tschamm closed 3 years ago

tschamm commented 3 years ago

This is more a question than an issue: Following the docs, the poll_id is invalidated after 5 minutes of inactivity. Does it matter if I unsubscribe from long polling?Skipping the unsubscribtion step will improve the speed when closing the library.

sebastianharder commented 3 years ago

Hi @tschamm, an active subscription caches events on the SHC until they are polled, which consumes memory and could be a potential problem when you have many active subscriptions at the same time. For a single subscription the memory consumption should be negligible. If a mobile phone looses the connection to the SHC, it can also not invalidate its subscription.