fix bug from prev checkin, destroy does not return a promise

This commit is contained in:
Dave Horton
2021-12-09 11:24:52 -05:00
parent 10382573fa
commit 3d4359fbe4

View File

@@ -718,10 +718,7 @@ class CallSession extends Emitter {
*/ */
_clearResources() { _clearResources() {
for (const resource of [this.dlg, this.ep]) { for (const resource of [this.dlg, this.ep]) {
if (resource && resource.connected) { if (resource && resource.connected) resource.destroy();
resource.destroy()
.catch((err) => this.logger.error(err, 'CallSession:_clearResources error'));
}
} }
this.dlg = null; this.dlg = null;
this.ep = null; this.ep = null;