remove dlg event handlers on destroy

This commit is contained in:
Dave Horton
2022-03-27 20:23:30 -04:00
parent e067125974
commit 0af8bcc348

View File

@@ -277,6 +277,8 @@ class CallSession extends Emitter {
}).catch((err) => this.logger.error({err}, 'Error writing cdr for completed call'));
}
/* de-link the 2 Dialogs for GC */
dlg.removeAllListeners();
other.removeAllListeners();
dlg.other = null;
other.other = null;
this.srf.endSession(this.req);