Skip to content

Commit

Permalink
remove reconnect timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
simonrauch committed Apr 29, 2020
1 parent 04db2f1 commit 8ab9641
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,10 @@ class ProjectorAccessory {
this.log('Socket error')
this.error = true
this.updateStatus(0)

if (!this.reconnectTimeout) {
this.reconnectTimeout = true
this.connect()
setTimeout(() => {
this.reconnectTimeout = false
}, CONNECTION_TIMEOUT)
}
this.connect()
}

handleData(data) {
this.log(data.toString())
if (this.messageInData(data, UP_MESSAGES)) {
this.log('Received UP message.')
this.updateStatus(1)
Expand Down

0 comments on commit 8ab9641

Please sign in to comment.