mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-16 01:32:44 +02:00
reconnect only after succesfull connection.
This commit is contained in:
parent
c49c9ad4de
commit
45c6c33647
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue