Remove debugging flag for ws server

This commit is contained in:
pengfeizhou 2021-02-21 01:57:29 +08:00 committed by osborn
parent af31014e2e
commit 5ca650c9cb
2 changed files with 1 additions and 6 deletions

View File

@ -76,11 +76,7 @@ export default async function dev() {
console.log("*******", jsFile.replace(process.cwd(), "") console.log("*******", jsFile.replace(process.cwd(), "")
.replace("/bundle/src/", "") .replace("/bundle/src/", "")
.replace(".js", "") .replace(".js", "")
.green, "*******") .green, "*******");
if ((server as any).debugging) {
console.log("debugging, hot reload by pass");
return;
}
try { try {
const sourceMap = `${jsFile}.map` const sourceMap = `${jsFile}.map`
if (fs.existsSync(sourceMap)) { if (fs.existsSync(sourceMap)) {

View File

@ -69,7 +69,6 @@ export async function createServer() {
}); });
ws.on('close', function (code: number) { ws.on('close', function (code: number) {
console.log('close: code = ' + code, thisDeviceId); console.log('close: code = ' + code, thisDeviceId);
(ws as any).debugging = false;
if (ws === debug) { if (ws === debug) {
console.log("quit debugging"); console.log("quit debugging");
client?.send(JSON.stringify({ client?.send(JSON.stringify({