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 {
40
40
} ) ;
41
41
}
42
42
43
- public close ( ) {
44
- this . closeWithReason ( undefined ) ;
45
- }
46
-
47
43
public isClosed ( ) {
48
44
return this . closed ;
49
45
}
@@ -52,7 +48,7 @@ export class BaseChannel {
52
48
return this . closedReason ;
53
49
}
54
50
55
- protected closeWithReason ( err ? : Error ) {
51
+ public closeWithReason ( err : Error ) {
56
52
if ( this . closed ) {
57
53
return ;
58
54
}
Original file line number Diff line number Diff line change @@ -402,7 +402,7 @@ export const dialWebRTC = async (
402
402
if ( dialOpts ?. dialTimeout !== undefined ) {
403
403
setTimeout ( ( ) => {
404
404
if ( ! successful ) {
405
- exchange . terminate ( ) ;
405
+ exchange . terminate ( new Error ( 'timed out' ) ) ;
406
406
}
407
407
} , dialOpts . dialTimeout ) ;
408
408
}
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ export class SignalingExchange {
73
73
. then ( ( ) => {
74
74
this . exchangeDone = true ;
75
75
} )
76
- . catch ( console . error ) ; // eslint-disable-line no-console
76
+ . catch ( console . error ) ;
77
77
78
78
// Initiate now the call now that all of our handlers are setup.
79
79
const callResponses = this . signalingClient . call ( callRequest , this . callOpts ) ;
@@ -127,8 +127,8 @@ export class SignalingExchange {
127
127
}
128
128
}
129
129
130
- public terminate ( ) {
131
- this . clientChannel . close ( ) ;
130
+ public terminate ( err : Error ) {
131
+ this . clientChannel . closeWithReason ( err ) ;
132
132
}
133
133
134
134
private async processCallResponses (
You can’t perform that action at this time.
0 commit comments