HomeSeer / Plugin-SDK

Plugin development kit for the 4th major edition of the HomeSeer platform.
https://www.nuget.org/packages/HomeSeer-PluginSDK/
GNU Affero General Public License v3.0
20 stars 4 forks source link

RegisterEventCB is not de-registered if plugin is re-started #337

Open alexbk66 opened 1 year ago

alexbk66 commented 1 year ago

If I call RegisterEventCB and then re-start the plugin - the event callback is still registered, unless I restart HS.

It's not a huge problem, but I think it's a wrong behaviour. If plugin is stopped - HS should de-register the callback.

Just to explain my issue I faced - I register the VALUE_CHANGE callback conditionally, only when needed.

alexbk66 commented 1 year ago

Also, there's no UnRegisterEventCB?

tenholde commented 1 year ago

I've been asking for a way to unregister this callback. I have done everything to properly close my plugin before exiting, but shortly after my plugin closes, error messages appear in the log that HS could not access my event routine.

I run a plugin, usually remotely, that starts and stops frequently and this sticky call back creates problems.

spudwebb commented 1 year ago

I also ran into this problem recently. It is tracked as HS-1764

mnsandler commented 1 year ago

Any progress on HS-1764?