Skip to content

Commit

Permalink
fixed crash case if we cannot retruieve the uuids
Browse files Browse the repository at this point in the history
  • Loading branch information
foxriver76 committed Jul 30, 2023
1 parent a0dd3be commit d6cdd9f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ In den Adapter-Settings muss die IP der Hue Bridge sowie ein Username konfigurie

### __WORK IN PROGRESS__
* (foxriver76) fixed edge case crash on button updates
* (foxriver76) fix crash case if uuids can not be retrieved

### 3.9.3 (2023-06-14)
* (foxriver76) fix crash cases on unknown push updates (closes #417)
Expand Down
7 changes: 6 additions & 1 deletion build/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/main.js.map

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1058,7 +1058,11 @@ class Hue extends utils.Adapter {

this.pushClient.addEventListener('open', async () => {
this.log.info('Push connection established');
this.UUIDs = await this.pushClient.uuids();
try {
this.UUIDs = await this.pushClient.uuids();
} catch (e: any) {
this.log.error(`Could not get UUIDs: ${e.message}`);
}
});

this.pushClient.addEventListener('close', () => {
Expand Down

0 comments on commit d6cdd9f

Please sign in to comment.