Fix stop not working for DevServer starter

This commit is contained in:
2026-03-02 12:10:18 +01:00
parent 008ff1091f
commit a750185df0
+4 -2
View File
@@ -109,11 +109,11 @@ class DevServer extends DefaultTask {
Finalizer() {
super()
doLast {
running = false
if (processInput != null) {
processInput.write(template.endsWith("Velocity") ? "end\n" : "stop\n")
processInput.flush()
}
running = false
}
}
}
@@ -245,10 +245,12 @@ class DevServer extends DefaultTask {
processInput.newLine()
processInput.flush()
}
processInput.close()
}).start()
process.waitFor()
if (processInput != null) {
processInput.close()
}
processInput = null
running = false
}