@babblevoice/babble-drachtio-callmanager 3.7.30 → 3.7.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/call.js +3 -5
- package/package.json +1 -1
package/lib/call.js
CHANGED
|
@@ -3798,19 +3798,17 @@ class call {
|
|
|
3798
3798
|
return this
|
|
3799
3799
|
}
|
|
3800
3800
|
|
|
3801
|
-
const hangups = []
|
|
3802
3801
|
if( this.parent ) {
|
|
3802
|
+
const hangups = []
|
|
3803
3803
|
for( const child of this.parent.children ) {
|
|
3804
3804
|
if( child !== this ) {
|
|
3805
3805
|
child.detach()
|
|
3806
|
-
/* do not await - we do not want to delay the winner in
|
|
3807
|
-
connecting by waiting for the completion of the hangups */
|
|
3808
3806
|
hangups.push( child.hangup( hangupcodes.LOSE_RACE ) )
|
|
3809
3807
|
}
|
|
3810
3808
|
}
|
|
3809
|
+
/* do not block the winner - race losers complete in background */
|
|
3810
|
+
Promise.all( hangups ).catch( ( e ) => console.error( e ) )
|
|
3811
3811
|
}
|
|
3812
|
-
|
|
3813
|
-
await Promise.all( hangups )
|
|
3814
3812
|
callstore.set( this )
|
|
3815
3813
|
|
|
3816
3814
|
if ( this._dialog.sip )
|