From f44a0824b3174c3f255e84afcc713f39eee38a02 Mon Sep 17 00:00:00 2001 From: pengfeizhou Date: Tue, 23 Feb 2021 16:25:21 +0800 Subject: [PATCH] feat:after stop debug,set client to undefined so that can connect annother client --- doric-cli/src/server.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doric-cli/src/server.ts b/doric-cli/src/server.ts index 96e76536..2670f06d 100644 --- a/doric-cli/src/server.ts +++ b/doric-cli/src/server.ts @@ -29,7 +29,6 @@ export async function createServer() { ws.on('message', async function (result: string) { const resultObject = JSON.parse(result) as MSG if (resultObject.type === "D2C") { - console.log("D2C", wss.clients.size, client) if (client === undefined) { if (wss.clients.size <= 1) { debug?.send(JSON.stringify({ @@ -110,6 +109,7 @@ export async function createServer() { type: "S2C", cmd: "DEBUG_STOP" } as MSG)); + client = undefined; } if (ws === client) { console.log("quit debugging");