alladdin / node-lox-ws-api

Node JS WebSocket Loxone™ API
MIT License
32 stars 23 forks source link

Cannot read property 'sendUTF' of undefined #5

Closed Sroose closed 7 years ago

Sroose commented 7 years ago

Hello,

The library sometimes crashes, I assume when the connection is dropped:

/usr/local/lib/node_modules/homebridge-loxone-ws/node_modules/node-lox-ws-api/lib/Connection.js:80

    that._ws.connection.sendUTF('keepalive');

                       ^
TypeError: Cannot read property 'sendUTF' of undefined

at null._repeat (/usr/local/lib/node_modules/homebridge-loxone-ws/node_modules/node-lox-ws-api/lib/Connection.js:80:28)

at wrapper [as _onTimeout] (timers.js:275:11)

at Timer.listOnTimeout (timers.js:92:15)

thanks for having a look!

alladdin commented 7 years ago

Fixed in version 0.2.5