feat:debugger quit after client disconnected

This commit is contained in:
pengfeizhou 2021-02-23 11:05:14 +08:00 committed by osborn
parent 752f0dbafd
commit 103a87df0b

View File

@ -102,6 +102,10 @@ export async function createServer() {
if (ws === client) { if (ws === client) {
console.log("quit debugging"); console.log("quit debugging");
client = undefined client = undefined
debug?.send(JSON.stringify({
type: "S2D",
cmd: "DEBUG_STOP"
} as MSG));
} }
}); });
ws.on('error', function (code: number) { ws.on('error', function (code: number) {
@ -115,7 +119,11 @@ export async function createServer() {
} }
if (ws === client) { if (ws === client) {
console.log("quit debugging"); console.log("quit debugging");
client = undefined client = undefined;
debug?.send(JSON.stringify({
type: "S2D",
cmd: "DEBUG_STOP"
} as MSG));
} }
}); });
}); });