Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/samples/conference/public/scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,19 @@ const runSocketIOSample = function() {
console.log('Participants in conference: ' + participants.length);
}, function(err) {
console.error('server connection failed:', err);
if (err.message.indexOf('connect_error:') >= 0) {
const signalingHost = err.message.replace('connect_error:', '');
const signalingUi = 'signaling';
removeUi(signalingUi);
let $p = $(`<div id=${signalingUi}> </div>`);
const anchor = $('<a/>', {
text: 'Click this for testing certificate and refresh',
target: '_blank',
href: `${signalingHost}/socket.io/`
});
anchor.appendTo($p);
$p.appendTo($('body'));
}
});
});
};
Expand Down
3 changes: 3 additions & 0 deletions src/sdk/conference/signaling.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ export class SioSignaling extends EventModule.EventDispatcher {
this.dispatchEvent(new EventModule.OwtEvent('disconnect'));
}
});
this._socket.on('connect_error', (e) => {
reject(`connect_error:${host}`);
});
this._socket.on('drop', () => {
this._reconnectTimes = reconnectionAttempts;
});
Expand Down