forked from SteamWar/SteamWar
Fix stop not working for DevServer starter
This commit is contained in:
@@ -109,11 +109,11 @@ class DevServer extends DefaultTask {
|
|||||||
Finalizer() {
|
Finalizer() {
|
||||||
super()
|
super()
|
||||||
doLast {
|
doLast {
|
||||||
running = false
|
|
||||||
if (processInput != null) {
|
if (processInput != null) {
|
||||||
processInput.write(template.endsWith("Velocity") ? "end\n" : "stop\n")
|
processInput.write(template.endsWith("Velocity") ? "end\n" : "stop\n")
|
||||||
processInput.flush()
|
processInput.flush()
|
||||||
}
|
}
|
||||||
|
running = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -245,10 +245,12 @@ class DevServer extends DefaultTask {
|
|||||||
processInput.newLine()
|
processInput.newLine()
|
||||||
processInput.flush()
|
processInput.flush()
|
||||||
}
|
}
|
||||||
processInput.close()
|
|
||||||
}).start()
|
}).start()
|
||||||
|
|
||||||
process.waitFor()
|
process.waitFor()
|
||||||
|
if (processInput != null) {
|
||||||
|
processInput.close()
|
||||||
|
}
|
||||||
processInput = null
|
processInput = null
|
||||||
running = false
|
running = false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user