mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
fixed does not send final status call back if call canceled quickly (#1393)
* fixed callsession should cleanup resource if call was canceled while fetching app * wip * wip * wip * wip * wip
This commit is contained in:
@@ -22,6 +22,12 @@ class InboundCallSession extends CallSession {
|
||||
this.req = req;
|
||||
this.res = res;
|
||||
|
||||
// if the call was canceled before we got here, handle it
|
||||
if (this.req.locals.canceled) {
|
||||
req.locals.logger.info('InboundCallSession: constructor - call was already canceled');
|
||||
this._onCancel();
|
||||
}
|
||||
|
||||
req.once('cancel', this._onCancel.bind(this));
|
||||
|
||||
this.on('callStatusChange', this._notifyCallStatusChange.bind(this));
|
||||
|
||||
Reference in New Issue
Block a user