This repository was archived by the owner on Oct 25, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
samples/conference/public/scripts Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -196,6 +196,19 @@ const runSocketIOSample = function() {
196
196
console . log ( 'Participants in conference: ' + participants . length ) ;
197
197
} , function ( err ) {
198
198
console . error ( 'server connection failed:' , err ) ;
199
+ if ( err . message . indexOf ( 'connect_error:' ) >= 0 ) {
200
+ const signalingHost = err . message . replace ( 'connect_error:' , '' ) ;
201
+ const signalingUi = 'signaling' ;
202
+ removeUi ( signalingUi ) ;
203
+ let $p = $ ( `<div id=${ signalingUi } > </div>` ) ;
204
+ const anchor = $ ( '<a/>' , {
205
+ text : 'Click this for testing certificate and refresh' ,
206
+ target : '_blank' ,
207
+ href : `${ signalingHost } /socket.io/`
208
+ } ) ;
209
+ anchor . appendTo ( $p ) ;
210
+ $p . appendTo ( $ ( 'body' ) ) ;
211
+ }
199
212
} ) ;
200
213
} ) ;
201
214
} ;
Original file line number Diff line number Diff line change @@ -79,6 +79,9 @@ export class SioSignaling extends EventModule.EventDispatcher {
79
79
this . dispatchEvent ( new EventModule . OwtEvent ( 'disconnect' ) ) ;
80
80
}
81
81
} ) ;
82
+ this . _socket . on ( 'connect_error' , ( e ) => {
83
+ reject ( `connect_error:${ host } ` ) ;
84
+ } ) ;
82
85
this . _socket . on ( 'drop' , ( ) => {
83
86
this . _reconnectTimes = reconnectionAttempts ;
84
87
} ) ;
You can’t perform that action at this time.
0 commit comments