forked from SteamWar/SteamWar
Fix RAM usage on multiple usages
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user