webrtc: do not connect if websocket unavailable.

This commit is contained in:
Miroslav Šedivý 2021-07-17 15:30:37 +02:00
parent 69f617ef45
commit 0974beaf4a

View File

@ -72,8 +72,10 @@ class WebrtcReconnecter extends ReconnecterAbstract {
} }
public async connect() { public async connect() {
if (this._websocket.connected) {
this._websocket.send(EVENT.SIGNAL_REQUEST, { video: this._state.webrtc.video }) this._websocket.send(EVENT.SIGNAL_REQUEST, { video: this._state.webrtc.video })
} }
}
public async disconnect() { public async disconnect() {
this._webrtc.disconnect() this._webrtc.disconnect()