You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HomekitRoot leaks connections in it's subscriptionManager when calling "start" then "stop" #54
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 a homekitRoot.start(). What I'm noticing is that the subscriptions from before are accumulating, resulting in more and more SubscriptionManager::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:
11:22:58.773 [INFO ] [.impl.connections.SubscriptionManager] - Publishing changes for 612672328
Then, after, say, 5 reloads of the bundle (resulting in a call to HomekitRoot::stop() and HomekitRoot::start() each time, toggling a switch from the iOS client will cause that message to be logged an additional five times:
12:03:21.146 [INFO ] [.impl.connections.SubscriptionManager] - Publishing changes for 612672328
12:03:21.146 [INFO ] [.impl.connections.SubscriptionManager] - Publishing changes for 612672328
12:03:21.146 [INFO ] [.impl.connections.SubscriptionManager] - Publishing changes for 612672328
12:03:21.146 [INFO ] [.impl.connections.SubscriptionManager] - Publishing changes for 612672328
12:03:21.146 [INFO ] [.impl.connections.SubscriptionManager] - Publishing changes for 612672328
12:03:21.146 [INFO ] [.impl.connections.SubscriptionManager] - Publishing changes for 612672328
Activity
Remove all subscriptions during homekitRoot.stop()
timcharper commentedon Jan 21, 2019
An attempt to fix this is seen in commit 7e8f98e
Remove all subscriptions during homekitRoot.stop()
Clear all connections in SessionManager during HomekitRoot.stop() (#55)
Bump hap plugin to include fix leaking sessions
Bump hap plugin to include fix leaking sessions
Bump hap plugin to include fix leaking sessions
Bump hap plugin to include fix leaking sessions