do not attempt connection if not supported.

This commit is contained in:
Miroslav Šedivý 2021-08-10 20:19:55 +02:00
parent d3d37de009
commit 621a06f7ba
2 changed files with 4 additions and 0 deletions

View File

@ -33,6 +33,8 @@ export class WebrtcReconnector extends ReconnectorAbstract {
}
public connect() {
if (!this._webrtc.supported) return
if (this._webrtc.connected) {
this._webrtc.disconnect()
}

View File

@ -29,6 +29,8 @@ export class WebsocketReconnector extends ReconnectorAbstract {
}
public connect() {
if (!this._websocket.supported) return
if (this._websocket.connected) {
this._websocket.disconnect()
}