Skip to content
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

Fix unpublish function to close all open connections and allow republish #759

Merged
merged 1 commit into from
Dec 1, 2019

Conversation

gotofoo
Copy link
Contributor

@gotofoo gotofoo commented Nov 29, 2019

After calling unpublish the HTTP server will be stopped but all clients stay connected which you can see if you call netstat. Any data which will be sent from those connected clients will still be processed even though the bridge should not be published anymore at this point. The process must be killed to close those open connections.

This makes it impossible to unpublish and republish a bridge. Furthermore the publish method cannot be called again because the ProtocolInformation service will be added again. The application needs to be restarted in order to be able to publish the bridge again.

Those issues lead to the issue described under NRCHKB/node-red-contrib-homekit-bridged#12 where it is not possible to redeploy a bridge node in Node-RED by calling unpublish and creating a new bridge instance.

@Shaquu
Copy link
Contributor

Shaquu commented Nov 30, 2019

Well, that’s hot.

@KhaosT
Copy link
Contributor

KhaosT commented Dec 1, 2019

🙏 Thanks for fixing this

@KhaosT KhaosT merged commit 445ed27 into homebridge:master Dec 1, 2019
@gotofoo gotofoo deleted the fix-unpublish branch December 7, 2019 18:16
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.

None yet

4 participants