Remove debugging flag for ws server
This commit is contained in:
parent
af31014e2e
commit
5ca650c9cb
@ -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)) {
|
||||||
|
@ -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({
|
||||||
|
Reference in New Issue
Block a user