fix no wifi issue after building
This commit is contained in:
@@ -786,7 +786,7 @@ async function streamBuildOutput(buildId, config = {}) {
|
|||||||
displayBuild(buildData);
|
displayBuild(buildData);
|
||||||
}
|
}
|
||||||
|
|
||||||
reader.releaseLock();
|
reader.cancel();
|
||||||
return;
|
return;
|
||||||
} else if (data.type === "error") {
|
} else if (data.type === "error") {
|
||||||
addBuildOutput(`\nERROR: ${data.error}\n`, "error");
|
addBuildOutput(`\nERROR: ${data.error}\n`, "error");
|
||||||
|
|||||||
@@ -11,6 +11,15 @@ export function getBuildStream(id: string): BuildStream | undefined {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function deleteBuildStream(id: string): boolean {
|
export function deleteBuildStream(id: string): boolean {
|
||||||
|
const build = activeBuildStreams.get(id);
|
||||||
|
if (build) {
|
||||||
|
build.controllers.forEach((controller) => {
|
||||||
|
try {
|
||||||
|
controller.close();
|
||||||
|
} catch {}
|
||||||
|
});
|
||||||
|
build.controllers.length = 0;
|
||||||
|
}
|
||||||
return activeBuildStreams.delete(id);
|
return activeBuildStreams.delete(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -186,6 +186,15 @@ export async function startBuildProcess(
|
|||||||
logger.error("[build] Failed to send to stream:", err);
|
logger.error("[build] Failed to send to stream:", err);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (data.type === "complete") {
|
||||||
|
build.controllers.forEach((controller) => {
|
||||||
|
try {
|
||||||
|
controller.close();
|
||||||
|
} catch {}
|
||||||
|
});
|
||||||
|
build.controllers.length = 0;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let winresTempDir: string | null = null;
|
let winresTempDir: string | null = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user