Skip to content

Commit

Permalink
fix: Do not close connection when adding listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
juliuscc authored Jul 16, 2019
1 parent 378fe04 commit a576ae2
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/connection/heosConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ export class HeosConnection {
* @param listener A callback that is called when the connection is closed. `hadError` is true if there was a transmission error.
*/
onClose(listener: (hadError: boolean) => void): HeosConnection {
this.closed = true
this.socket.on('close', listener)
return this
}
Expand All @@ -121,7 +120,6 @@ export class HeosConnection {
* @param listener A callback thar is called when an error occurs.
*/
onError(listener: (error: Error) => void): HeosConnection {
this.closed = true
this.socket.on('error', listener)
return this
}
Expand Down

0 comments on commit a576ae2

Please sign in to comment.