Fix RAM usage on multiple usages

This commit is contained in:
2025-04-18 14:52:27 +02:00
parent 925901e40e
commit 83c20729fa
+4 -1
View File
@@ -82,11 +82,15 @@ class DevServer extends DefaultTask {
@Internal
String host
@Internal
Boolean running = true
class Finalizer extends DefaultTask {
Finalizer() {
super()
doLast {
running = false
if (processInput != null) {
processInput.write(template.endsWith("Velocity") ? "end\n" : "stop\n")
processInput.flush()
@@ -137,7 +141,6 @@ class DevServer extends DefaultTask {
devPy.append(" $template")
def process = new ProcessBuilder("ssh", host, "-T", devPy.toString()).start()
def running = true;
def processOutput = new BufferedReader(new InputStreamReader(process.inputStream))
new Thread({
while (running) {