Make system terminator force shutdown after 5 seconds of attempting to drop all players.

This commit is contained in:
ceikry 2021-07-22 15:12:15 -05:00
parent 85888178dd
commit 8d76c54ae3

View file

@ -78,7 +78,8 @@ public final class SystemTermination {
e.printStackTrace();
}
}
while(!Repository.getDisconnectionQueue().isEmpty()){
long start = System.currentTimeMillis();
while(!Repository.getDisconnectionQueue().isEmpty() && System.currentTimeMillis() - start < 5000L){
Repository.getDisconnectionQueue().update();
try {
Thread.sleep(100);