AlexanderBabel / homebridge-broadlink-rm

[This fork supports TV accessories] Broadlink RM Mini and Pro plugin for homebridge: https://github.com/nfarina/homebridge
Apache License 2.0
46 stars 11 forks source link

Improved ping error handling #46

Closed kiwi-cam closed 4 years ago

kiwi-cam commented 4 years ago

Removed ping exception throw and treated as a non response to allow retries. To resolve #45

kiwi-cam commented 4 years ago

This is a bug fix for #45. From what I can understand ENOTCONN means that the remote end closed the TCP tunnel before the plugin completed it's ping. I've updated to treat errors with the ping as if the Broadlink device is offline. Previously these errors threw an exception and crashed homebridge.

@AlexanderBabel If you're keen, it's probably a good time to update npm - or wait for #47 which I'm currently testing with a user.

AlexanderBabel commented 4 years ago

Alright, the 4.0.2 is now published.

Thanks again for your work!