From 5de53dd41e48cc7ceff7870add7b30ff05b141c2 Mon Sep 17 00:00:00 2001 From: acgist <289547414@qq.com> Date: Mon, 9 Oct 2023 09:55:02 +0800 Subject: [PATCH] =?UTF-8?q?[*]=20=E4=BF=A1=E4=BB=A4=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- taoyao-client-web/src/components/Taoyao.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/taoyao-client-web/src/components/Taoyao.js b/taoyao-client-web/src/components/Taoyao.js index 9e629a1..8d01aff 100644 --- a/taoyao-client-web/src/components/Taoyao.js +++ b/taoyao-client-web/src/components/Taoyao.js @@ -137,16 +137,13 @@ const signalChannel = { */ async connect(address, reconnection = true) { const me = this; - // 直接返回旧的连接 if (me.connected()) { + this.taoyao.connect = true; return new Promise((resolve, reject) => { resolve(me.channel); }); - } - // 关闭旧的无效连接 - if(this.channel) { - console.debug("关闭旧的信令连接", this.address); - this.close(); + } else { + this.taoyao.connect = false; } me.address = address; me.reconnection = reconnection;