From 5babb30028522360e3e5e85f4f763f9f2a5c35e8 Mon Sep 17 00:00:00 2001 From: prlanzarin Date: Fri, 3 Apr 2020 19:54:19 +0000 Subject: [PATCH] [audio] Clear mediaFlowing/State timeouts on stop 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 --- lib/audio/audio.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/audio/audio.js b/lib/audio/audio.js index 1b20a8aa..4b07f14f 100644 --- a/lib/audio/audio.js +++ b/lib/audio/audio.js @@ -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 () {