check dlg connected before deleting

This commit is contained in:
Dave Horton
2020-03-09 22:07:30 +00:00
parent e4c3de0b5c
commit f7a76733a1

View File

@@ -570,7 +570,7 @@ class CallSession extends Emitter {
const duration = moment().diff(this.dlg.connectTime, 'seconds');
this.emit('callStatusChange', {callStatus: CallStatus.Completed, duration});
this.logger.debug('CallSession: call terminated by jambones');
origDestroy();
if (dlg.connected) origDestroy();
};
}