Skip to content

Fix for unregistering service when re-advertising #143

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

Merged
merged 1 commit into from
Apr 7, 2021

Conversation

andylintner
Copy link
Collaborator

Pull Request Checklist

Please confirm that you've done the following when opening a new pull request:

  • For fixes and other improvements, please reference the GitHub issue that your change addresses.
  • For fixes, optimizations and new features, please add an entry to the CHANGES.md file.
  • Run mvn compile before committing, so that the auto-code formatter will format your changes consistently with the rest of the project.

When we change the properties that we’re advertising over mDNS we unregister and re-register the service. However, we were calling unregister after changing the properties. This happened to work with our version of jmdns, which only compared the qualified name. jmdns has quite a few forks however, and it’s best to adhere to the implied contract when calling unregisterService.

This is adapted from a fix proposed by J-N-K
@andylintner
Copy link
Collaborator Author

Related to discussion in #128

@andylintner andylintner mentioned this pull request Apr 4, 2021
@andylintner andylintner merged commit dd97a77 into hap-java:master Apr 7, 2021
@andylintner andylintner deleted the unregister-service-fix branch April 7, 2021 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants