From a553105e552238d131f661f9ed25fca23689ec99 Mon Sep 17 00:00:00 2001 From: two56 Date: Mon, 23 Jan 2023 17:35:41 +0000 Subject: [PATCH] If running stop srs (#60) client on destruction Co-authored-by: Matt Preskett --- lib/call-session.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/call-session.js b/lib/call-session.js index 1c58047..39104ee 100644 --- a/lib/call-session.js +++ b/lib/call-session.js @@ -519,6 +519,11 @@ class CallSession extends Emitter { dlg.other = null; other.other = null; + if (this.srsClient) { + this.srsClient.stop(); + this.srsClient = null; + } + this.logger.info(`call ended with normal termination, there are ${this.activeCallIds.size} active`); this.srf.endSession(this.req);