Closed brannon-bowden closed 3 years ago
Looks like this page has some insight on how to resolve, https://stackoverflow.com/questions/32960956/nodejs-websocket-node-module-how-to-make-multi-client-socket-server-works
Got this working based on the stackoverflow, albeit I am not removing disconnected connections from the array yet, so need to sort that out. I will try to create a PR asap.
Partially Resolved with the following pull request, but need some help with cleaning up disconnected sessions. https://github.com/cflurin/homebridge-websocket/pull/16
Hi, I don't use homebridge-websocket anymore. As an alternative try homebridge-mqtt. If you can't use homebridge-mqtt, I'll have a look at it but just now I'm working on an other project.
I'm running into an issue, that I can't quite narrow down. I basically end up in a state where my websocket client quits receiving MOST (but not all) data. I can reproduce the issue by simply connecting a second client to the same websocket port as my first. The first client will stay connected, but quits receiving data, and the second one starts receiving it all. I have to disconnect both clients, and then reconnect the main one for it to start working again.
Do you happen to have any thoughts?