Skip to content

Commit

Permalink
[audio] Clear mediaFlowing/State timeouts on stop
Browse files Browse the repository at this point in the history
This should avoid a race condition where a session was stopped before the media trigger cleared the timeouts and they would cause a leak and/r incorrectly trigger a trailing timeout on a probable successful reconnection
  • Loading branch information
prlanzarin committed Apr 3, 2020
1 parent 7eb4e6e commit 5babb30
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/audio/audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,8 @@ module.exports = class Audio extends BaseProvider {

delete this.candidatesQueue[connectionId];
delete this.audioEndpoints[connectionId];
this.clearMediaFlowingTimeout(connectionId);
this.clearMediaStateTimeout(connectionId);
}

async stop () {
Expand Down

0 comments on commit 5babb30

Please sign in to comment.