-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HomekitRoot leaks connections in it's subscriptionManager when calling "start" then "stop" #54
Comments
timcharper
added a commit
to timcharper/HAP-Java
that referenced
this issue
Jan 21, 2019
This is a potential fix for hap-java#54
An attempt to fix this is seen in commit 7e8f98e |
timcharper
added a commit
to timcharper/HAP-Java
that referenced
this issue
Jan 28, 2019
This is a potential fix for hap-java#54
andylintner
pushed a commit
that referenced
this issue
Feb 3, 2019
Remove all subscriptions during homekitRoot.stop() This is a potential fix for #54
ccutrer
pushed a commit
to ccutrer/openhab-addons
that referenced
this issue
Feb 13, 2019
For more information on the issue, see hap-java/HAP-Java#54
timcharper
added a commit
to hap-java/openhab2-addons
that referenced
this issue
Feb 27, 2019
For more information on the issue, see hap-java/HAP-Java#54
ccutrer
pushed a commit
to ccutrer/openhab-addons
that referenced
this issue
Mar 3, 2019
For more information on the issue, see hap-java/HAP-Java#54
timcharper
added a commit
to hap-java/openhab2-addons
that referenced
this issue
Mar 10, 2019
For more information on the issue, see hap-java/HAP-Java#54
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've come to notice this issue when working on the Homekit extension for Openhab2. When I reload the bundle, it calls
homekitRoot.stop()
, followed by a reload of the Java classes, followed by ahomekitRoot.start()
. What I'm noticing is that the subscriptions from before are accumulating, resulting in more and moreSubscriptionManager::publish
calls with each reload.Here's what I'll see in the logs when toggling a homekit switch from the iOS client during the first load:
Then, after, say, 5 reloads of the bundle (resulting in a call to
HomekitRoot::stop()
andHomekitRoot::start() each time
, toggling a switch from the iOS client will cause that message to be logged an additional five times:After digging around, it looks like characteristic.unsubscribe() in SubscriptionManage.java#L71 isn't getting called during
stop()
. I added some log messages to log when a connection is removed via SubscriptionManager::removeConnection() and SubscriptionManager::removeSubscription(...), and neither are invoked nor do connections appear to be ever removed. I'm not sure what mechanism is expected to clean these up, but the failure to have these cleaned up is what's leading to the accumulation of characteristic subscriptions.The text was updated successfully, but these errors were encountered: