From ce850159498d2b0c9e46d26827235c0b3135f256 Mon Sep 17 00:00:00 2001 From: Grzegorz Date: Sat, 29 Jun 2024 13:46:30 +0200 Subject: [PATCH] fix sporadic error during subscribe --- package.json | 2 +- src/lgwebossocket.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 103fad6..5c7c553 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "displayName": "LG webOS TV", "name": "homebridge-lgwebos-tv", - "version": "2.19.10", + "version": "2.19.19", "description": "Homebridge plugin to control LG webOS TV.", "license": "MIT", "author": "grzegorz914", diff --git a/src/lgwebossocket.js b/src/lgwebossocket.js index a9a8d17..6d0a2c2 100644 --- a/src/lgwebossocket.js +++ b/src/lgwebossocket.js @@ -255,16 +255,16 @@ class LgWebOsSocket extends EventEmitter { this.emit('error', `Request apps error: ${error}`); }; - await new Promise(resolve => setTimeout(resolve, 1500)); //Start prepare accessory + await new Promise(resolve => setTimeout(resolve, 1500)); try { const prepareAccessory = this.startPrepareAccessory ? await this.prepareAccessory() : false; } catch (error) { this.emit('error', `Prepare accessory error: ${error}.`); } - await new Promise(resolve => setTimeout(resolve, 2500)); //Subscribe tv status + await new Promise(resolve => setTimeout(resolve, 3000)); try { const debug = debugLog ? this.emit('debug', `Subscirbe tv status.`) : false; await this.subscribeTvStatus();