Skip to content

Commit

Permalink
Update HueBridge.js
Browse files Browse the repository at this point in the history
Issue #1148, take 3.
  • Loading branch information
ebaauw committed Mar 5, 2023
1 parent afb0837 commit 8e438ad
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/HueBridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -996,8 +996,8 @@ HueBridge.prototype.listen = function () {
}

HueBridge.prototype.listen2 = async function () {
const eventStream = new EventStreamClient(this.hueClient, { retryTime: 15 })
eventStream
this.eventStream = new EventStreamClient(this.hueClient, { retryTime: 15 })
this.eventStream
.on('error', (error) => {
if (error.request == null) {
this.log.warn('%s: event stream error: %s', this.name, formatError(error))
Expand Down Expand Up @@ -1064,8 +1064,8 @@ HueBridge.prototype.listen2 = async function () {
this.log.warn('%s: event stream error: %s', this.name, formatError(error))
}
})
await eventStream.init()
eventStream.listen()
await this.eventStream.init()
this.eventStream.listen()
}

// ===== Heartbeat =============================================================
Expand Down

0 comments on commit 8e438ad

Please sign in to comment.