13
0

Merge pull request 'Enable command execution, force destruction' (#20) from executeCommand into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Reviewed-on: #20
Reviewed-by: YoyoNow <jwsteam@nidido.de>
Dieser Commit ist enthalten in:
Lixfel 2022-03-17 18:13:07 +01:00
Commit 3b96517682

Datei anzeigen

@ -130,11 +130,15 @@ public class Subserver implements Runnable {
} }
} }
public void execute(String command) {
writer.println(command);
}
public void stop(){ public void stop(){
writer.println("stop"); execute("stop");
try { try {
if(!process.waitFor(1, TimeUnit.MINUTES)) if(!process.waitFor(1, TimeUnit.MINUTES))
process.destroy(); process.destroyForcibly();
thread.join(); thread.join();
}catch(InterruptedException e){ }catch(InterruptedException e){
logger.log(Level.SEVERE, "Subserver stop interrupted!", e); logger.log(Level.SEVERE, "Subserver stop interrupted!", e);