nfarina/homebridge-sonos

Not Catching Errors When Device Is Disconnected

Closed this issue · 1 comments

Looks like you are not catching errors when a device is disconnected from the network (dropout or power out):

Disconnecting the speaker I get:

events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: connect EHOSTUNREACH 192.168.60.122:1400
    at Object.exports._errnoException (util.js:896:11)
    at exports._exceptionWithHostPort (util.js:919:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1073:14)

Should probably catch this and handle gracefully

Already referenced bencevans/node-sonos#121