node-red-contrib-yandex-station-management 0.3.4 → 0.3.5

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.
@@ -369,11 +369,9 @@ module.exports = function(RED) {
369
369
  device.ws.on('error', function error(data){
370
370
  //statusUpdate({"color": "red", "text": "disconnected"}, device);
371
371
  debugMessage(`error: ${data}`);
372
- device.ws.terminate();
373
- // if (device.localConnectionFlag) {
374
- // debugMessage(`Reconnecting in 60 seconds...` );
375
- // setTimeout(connect, 60000, device);
376
- // }
372
+ if (typeof(device) !== 'undefined' && typeof(device.ws) !== 'undefined' ) {
373
+ device.ws.terminate();
374
+ }
377
375
  });
378
376
  };
379
377
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-yandex-station-management",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "Local management of YandexStation using API on websockets",
5
5
  "main": "index.js",
6
6
  "scripts": {