mirror of https://github.com/OpenVidu/openvidu.git
Correctly handle error on connection
parent
b7a36700f9
commit
4c94412439
|
@ -858,13 +858,14 @@ export class OpenVidu {
|
|||
/**
|
||||
* @hidden
|
||||
*/
|
||||
startWs(onConnectSucces: (error: Error) => void): void {
|
||||
startWs(onConnectOrError: (error: Error) => void): void {
|
||||
const config = {
|
||||
heartbeat: 5000,
|
||||
sendCloseMessage: false,
|
||||
ws: {
|
||||
uri: this.wsUri,
|
||||
onconnected: onConnectSucces,
|
||||
onconnected: onConnectOrError,
|
||||
onerror: onConnectOrError,
|
||||
ondisconnect: this.disconnectCallback.bind(this),
|
||||
onreconnecting: this.reconnectingCallback.bind(this),
|
||||
onreconnected: this.reconnectedCallback.bind(this)
|
||||
|
|
Loading…
Reference in New Issue