René's URL Explorer Experiment


Title: HomekitRoot leaks connections in it's subscriptionManager when calling "start" then "stop" · Issue #54 · hap-java/HAP-Java · GitHub

Open Graph Title: HomekitRoot leaks connections in it's subscriptionManager when calling "start" then "stop" · Issue #54 · hap-java/HAP-Java

X Title: HomekitRoot leaks connections in it's subscriptionManager when calling "start" then "stop" · Issue #54 · hap-java/HAP-Java

Description: 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 t...

Open Graph Description: 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 hom...

X Description: 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...

Opengraph URL: https://github.com/hap-java/HAP-Java/issues/54

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"HomekitRoot leaks connections in it's subscriptionManager when calling \"start\" then \"stop\"","articleBody":"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`](https://github.com/beowulfe/HAP-Java/blob/3ec72649c59671d2d917fa9072bdd6aef55bccaa/src/main/java/com/beowulfe/hap/impl/connections/SubscriptionManager.java#L84) calls with each reload.\r\n\r\nHere's what I'll see in the logs when toggling a homekit switch from the iOS client during the first load:\r\n\r\n```\r\n11:22:58.773 [INFO ] [.impl.connections.SubscriptionManager] - Publishing changes for 612672328\r\n```\r\n\r\nThen, 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:\r\n\r\n```\r\n12:03:21.146 [INFO ] [.impl.connections.SubscriptionManager] - Publishing changes for 612672328\r\n12:03:21.146 [INFO ] [.impl.connections.SubscriptionManager] - Publishing changes for 612672328\r\n12:03:21.146 [INFO ] [.impl.connections.SubscriptionManager] - Publishing changes for 612672328\r\n12:03:21.146 [INFO ] [.impl.connections.SubscriptionManager] - Publishing changes for 612672328\r\n12:03:21.146 [INFO ] [.impl.connections.SubscriptionManager] - Publishing changes for 612672328\r\n12:03:21.146 [INFO ] [.impl.connections.SubscriptionManager] - Publishing changes for 612672328\r\n```\r\n\r\nAfter digging around, it looks like [characteristic.unsubscribe() in SubscriptionManage.java#L71](https://github.com/beowulfe/HAP-Java/blob/3ec72649c59671d2d917fa9072bdd6aef55bccaa/src/main/java/com/beowulfe/hap/impl/connections/SubscriptionManager.java#L71) isn't getting called during `stop()`. I added some log messages to log when a connection is removed via [SubscriptionManager::removeConnection()](https://github.com/beowulfe/HAP-Java/blob/3ec72649c59671d2d917fa9072bdd6aef55bccaa/src/main/java/com/beowulfe/hap/impl/connections/SubscriptionManager.java#L64) and [SubscriptionManager::removeSubscription(...)](https://github.com/beowulfe/HAP-Java/blob/3ec72649c59671d2d917fa9072bdd6aef55bccaa/src/main/java/com/beowulfe/hap/impl/connections/SubscriptionManager.java#L48), 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.","author":{"url":"https://github.com/timcharper","@type":"Person","name":"timcharper"},"datePublished":"2019-01-21T20:56:19.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/54/HAP-Java/issues/54"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d25a0b77-7a43-6f28-d197-d1d63a652ca8
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC5B2:79909:102461B:14C886C:69746DEA
html-safe-nonce43ac5db1f1e316dc6a3224ab1e314b34d61c02398ec122c31b64b77f1d39fd76
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNUIyOjc5OTA5OjEwMjQ2MUI6MTRDODg2Qzo2OTc0NkRFQSIsInZpc2l0b3JfaWQiOiI1NDg5OTA3MzI2NDI2MzEyMTcwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac54b1befebe1765c69199ce62cdd474d4e236d159446dfe56738cc32f75a3b470
hovercard-subject-tagissue:401507681
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/hap-java/HAP-Java/54/issue_layout
twitter:imagehttps://opengraph.githubassets.com/60ef95e000f457f88225714114674846e4f6874ec71f1205cc1d80c58300ab7a/hap-java/HAP-Java/issues/54
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/60ef95e000f457f88225714114674846e4f6874ec71f1205cc1d80c58300ab7a/hap-java/HAP-Java/issues/54
og:image:altI'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 hom...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametimcharper
hostnamegithub.com
expected-hostnamegithub.com
Nonee0b95d743b7672c9ac0e1032d5f117950182dc164a83434a7db86510e8f0b37c
turbo-cache-controlno-preview
go-importgithub.com/hap-java/HAP-Java git https://github.com/hap-java/HAP-Java.git
octolytics-dimension-user_id47992845
octolytics-dimension-user_loginhap-java
octolytics-dimension-repository_id31193475
octolytics-dimension-repository_nwohap-java/HAP-Java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id31193475
octolytics-dimension-repository_network_root_nwohap-java/HAP-Java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release56fe7e2e8de6e57740bca50402351ea656f7a4bf
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/hap-java/HAP-Java/issues/54#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fhap-java%2FHAP-Java%2Fissues%2F54
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fhap-java%2FHAP-Java%2Fissues%2F54
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=hap-java%2FHAP-Java
Reloadhttps://github.com/hap-java/HAP-Java/issues/54
Reloadhttps://github.com/hap-java/HAP-Java/issues/54
Reloadhttps://github.com/hap-java/HAP-Java/issues/54
hap-java https://github.com/hap-java
HAP-Javahttps://github.com/hap-java/HAP-Java
Notifications https://github.com/login?return_to=%2Fhap-java%2FHAP-Java
Fork 84 https://github.com/login?return_to=%2Fhap-java%2FHAP-Java
Star 160 https://github.com/login?return_to=%2Fhap-java%2FHAP-Java
Code https://github.com/hap-java/HAP-Java
Issues 10 https://github.com/hap-java/HAP-Java/issues
Pull requests 1 https://github.com/hap-java/HAP-Java/pulls
Actions https://github.com/hap-java/HAP-Java/actions
Projects 0 https://github.com/hap-java/HAP-Java/projects
Wiki https://github.com/hap-java/HAP-Java/wiki
Security 0 https://github.com/hap-java/HAP-Java/security
Insights https://github.com/hap-java/HAP-Java/pulse
Code https://github.com/hap-java/HAP-Java
Issues https://github.com/hap-java/HAP-Java/issues
Pull requests https://github.com/hap-java/HAP-Java/pulls
Actions https://github.com/hap-java/HAP-Java/actions
Projects https://github.com/hap-java/HAP-Java/projects
Wiki https://github.com/hap-java/HAP-Java/wiki
Security https://github.com/hap-java/HAP-Java/security
Insights https://github.com/hap-java/HAP-Java/pulse
New issuehttps://github.com/login?return_to=https://github.com/hap-java/HAP-Java/issues/54
New issuehttps://github.com/login?return_to=https://github.com/hap-java/HAP-Java/issues/54
HomekitRoot leaks connections in it's subscriptionManager when calling "start" then "stop"https://github.com/hap-java/HAP-Java/issues/54#top
https://github.com/timcharper
https://github.com/timcharper
timcharperhttps://github.com/timcharper
on Jan 21, 2019https://github.com/hap-java/HAP-Java/issues/54#issue-401507681
SubscriptionManager::publishhttps://github.com/beowulfe/HAP-Java/blob/3ec72649c59671d2d917fa9072bdd6aef55bccaa/src/main/java/com/beowulfe/hap/impl/connections/SubscriptionManager.java#L84
characteristic.unsubscribe() in SubscriptionManage.java#L71https://github.com/beowulfe/HAP-Java/blob/3ec72649c59671d2d917fa9072bdd6aef55bccaa/src/main/java/com/beowulfe/hap/impl/connections/SubscriptionManager.java#L71
SubscriptionManager::removeConnection()https://github.com/beowulfe/HAP-Java/blob/3ec72649c59671d2d917fa9072bdd6aef55bccaa/src/main/java/com/beowulfe/hap/impl/connections/SubscriptionManager.java#L64
SubscriptionManager::removeSubscription(...)https://github.com/beowulfe/HAP-Java/blob/3ec72649c59671d2d917fa9072bdd6aef55bccaa/src/main/java/com/beowulfe/hap/impl/connections/SubscriptionManager.java#L48
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.