mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
reconnect only after succesfull connection.
This commit is contained in:
parent
c49c9ad4de
commit
45c6c33647
@ -123,8 +123,6 @@ export class NekoConnection extends EventEmitter<NekoConnectionEvents> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async connect(video?: string): Promise<void> {
|
public async connect(video?: string): Promise<void> {
|
||||||
this._shouldReconnect = true
|
|
||||||
|
|
||||||
await this._websocketConnect()
|
await this._websocketConnect()
|
||||||
|
|
||||||
if (video && !this._state.webrtc.videos.includes(video)) {
|
if (video && !this._state.webrtc.videos.includes(video)) {
|
||||||
@ -132,6 +130,8 @@ export class NekoConnection extends EventEmitter<NekoConnectionEvents> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._webrtcConnect(video)
|
this._webrtcConnect(video)
|
||||||
|
|
||||||
|
this._shouldReconnect = true
|
||||||
}
|
}
|
||||||
|
|
||||||
public disconnect() {
|
public disconnect() {
|
||||||
|
Loading…
Reference in New Issue
Block a user