node-red-contrib-yandex-station-management 0.3.6 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -291,7 +291,9 @@ module.exports = function(RED) {
291
291
  device.waitForListening = false;
292
292
  device.playAfterTTS = false;
293
293
  device.waitForIdle = false;
294
- device.watchDog = setTimeout(() => device.ws.close(), 10000);
294
+ device.watchDog = setTimeout(() => {
295
+ if (typeof(device) != 'undefined' && typeof(device.ws) != 'undefined') {device.ws.close()}
296
+ }, 10000);
295
297
  device.pingInterval = setInterval(onPing,300,device);
296
298
  debugMessage(`${device.id}: Kill connection watchdog`);
297
299
  clearTimeout(device.watchDogConn);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-yandex-station-management",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "Local management of YandexStation using API on websockets",
5
5
  "main": "index.js",
6
6
  "scripts": {