From f6edb4208edaa714aad6926c5c60dae05a2862f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sat, 19 Jun 2021 21:42:25 +0200 Subject: [PATCH] set as disconnected only if not connecting. --- src/component/internal/connection.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/component/internal/connection.ts b/src/component/internal/connection.ts index 977e71c2..fc1340dd 100644 --- a/src/component/internal/connection.ts +++ b/src/component/internal/connection.ts @@ -44,7 +44,7 @@ export class NekoConnection extends EventEmitter { } }) this.websocket.on('disconnected', () => { - if (this._state.status !== 'disconnected') { + if (this._state.status === 'connected') { Vue.set(this._state, 'status', 'disconnected') } @@ -63,7 +63,7 @@ export class NekoConnection extends EventEmitter { } }) this.webrtc.on('disconnected', () => { - if (this._state.status !== 'disconnected') { + if (this._state.status === 'connected') { Vue.set(this._state, 'status', 'disconnected') }