Skip to content

Commit

Permalink
fix(voip): Bind heartbeat class methods so that 'this' is always what…
Browse files Browse the repository at this point in the history
… we expect. (#59)
  • Loading branch information
cuevaskoch authored May 28, 2019
1 parent 08746b1 commit 0f07ae7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/resources/VoipHeartbeatHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,14 @@ class VoipHeartbeatHandler {
this.setCallState = this.setCallState.bind(this);
this.sendHeartbeat = this.sendHeartbeat.bind(this);
this.readHeartbeat = this.readHeartbeat.bind(this);

this.onHeartbeatTimeout = this.onHeartbeatTimeout.bind(this);
this.onDesiredCallStateChange = this.onDesiredCallStateChange.bind(this);
this.onDisconnect = this.onDisconnect.bind(this);
this.onReconnect = this.onReconnect.bind(this);

this.startHeartbeat = this.startHeartbeat.bind(this);
this.stopHeartbeat = this.stopHeartbeat.bind(this);

this.realTimeClient.registerHeartbeatHandler(this.readHeartbeat);
}
Expand Down

0 comments on commit 0f07ae7

Please sign in to comment.