Skip to content
This repository has been archived by the owner. It is now read-only.

Homebridge-homeassistant plugin not dropping socket connections when homeassistant restarted #150

Open
terrycarlin opened this issue May 5, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@terrycarlin
Copy link

commented May 5, 2017

Pi3/Raspbian:
When homeassistant is restarted, the plugin is not closing the old socket connections This shows up when you are developing your hass configuration and have to restart homeassistant many times over a long time period. I have seen almost 500 connections from the plugin to homeassistant and since there is two sockets used per connection, that was almost 1000 sockets opened and homeassistant got really slow. You can get around this issue by restarting homebridge everytime you restart homeassistant, but that is kind of a kludge. I am thinking that there should be some sort of a socket timeout when homeassistant goes away.

Steps to duplicate:

  1. have homebridge, homebridge-homeassistant, homeassistant running.
  2. Do a netstat -a|grep 8123 and see the number of connections.
  3. restart homeassistant. Do not reboot the server.
  4. Do a netstat -a|grep 8123 and see that the number of connections went up.

@robbiet480 robbiet480 added the bug label May 5, 2017

@robbiet480

This comment has been minimized.

Copy link
Member

commented May 5, 2017

I'll most likely fix this when we migrate to using Websockets instead of SSE. Thanks for the report!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.