File tree Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Expand file tree Collapse file tree 3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -40,10 +40,6 @@ export class BaseChannel {
4040 } ) ;
4141 }
4242
43- public close ( ) {
44- this . closeWithReason ( undefined ) ;
45- }
46-
4743 public isClosed ( ) {
4844 return this . closed ;
4945 }
@@ -52,7 +48,7 @@ export class BaseChannel {
5248 return this . closedReason ;
5349 }
5450
55- protected closeWithReason ( err ? : Error ) {
51+ public closeWithReason ( err : Error ) {
5652 if ( this . closed ) {
5753 return ;
5854 }
Original file line number Diff line number Diff line change @@ -402,7 +402,7 @@ export const dialWebRTC = async (
402402 if ( dialOpts ?. dialTimeout !== undefined ) {
403403 setTimeout ( ( ) => {
404404 if ( ! successful ) {
405- exchange . terminate ( ) ;
405+ exchange . terminate ( new Error ( 'timed out' ) ) ;
406406 }
407407 } , dialOpts . dialTimeout ) ;
408408 }
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ export class SignalingExchange {
7373 . then ( ( ) => {
7474 this . exchangeDone = true ;
7575 } )
76- . catch ( console . error ) ; // eslint-disable-line no-console
76+ . catch ( console . error ) ;
7777
7878 // Initiate now the call now that all of our handlers are setup.
7979 const callResponses = this . signalingClient . call ( callRequest , this . callOpts ) ;
@@ -127,8 +127,8 @@ export class SignalingExchange {
127127 }
128128 }
129129
130- public terminate ( ) {
131- this . clientChannel . close ( ) ;
130+ public terminate ( err : Error ) {
131+ this . clientChannel . closeWithReason ( err ) ;
132132 }
133133
134134 private async processCallResponses (
You can’t perform that action at this time.
0 commit comments