mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
do not attempt connection if not supported.
This commit is contained in:
parent
d3d37de009
commit
621a06f7ba
@ -33,6 +33,8 @@ export class WebrtcReconnector extends ReconnectorAbstract {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public connect() {
|
public connect() {
|
||||||
|
if (!this._webrtc.supported) return
|
||||||
|
|
||||||
if (this._webrtc.connected) {
|
if (this._webrtc.connected) {
|
||||||
this._webrtc.disconnect()
|
this._webrtc.disconnect()
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,8 @@ export class WebsocketReconnector extends ReconnectorAbstract {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public connect() {
|
public connect() {
|
||||||
|
if (!this._websocket.supported) return
|
||||||
|
|
||||||
if (this._websocket.connected) {
|
if (this._websocket.connected) {
|
||||||
this._websocket.disconnect()
|
this._websocket.disconnect()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user