13
0

Implement wait for termianation

Dieser Commit ist enthalten in:
Lixfel 2021-04-03 09:04:40 +02:00
Ursprung bd7e4a5e53
Commit e120bb1ce1

Datei anzeigen

@ -130,6 +130,16 @@ public class Subserver implements Runnable {
} }
} }
public void waitForTermination(){
try {
if(!process.waitFor(5, TimeUnit.MINUTES))
process.destroy();
}catch(InterruptedException e){
logger.log(Level.SEVERE, "Subserver stop interrupted!", e);
Thread.currentThread().interrupt();
}
}
static void shutdown(){ static void shutdown(){
while (!serverList.isEmpty()) { while (!serverList.isEmpty()) {
Subserver server = serverList.get(0); Subserver server = serverList.get(0);