Skip to content

Commit

Permalink
fix sporadic error during subscribe
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorz914 committed Jun 29, 2024
1 parent 53b236e commit ce85015
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/lgwebossocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit ce85015

Please sign in to comment.