mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-07 08:39:07 +00:00
Added block on main thread until tick scheduler shutdown.
This commit is contained in:
@@ -213,7 +213,14 @@ public class GameEngine {
|
|||||||
}
|
}
|
||||||
}, 0, GameConstants.CYCLE_TIME, TimeUnit.MILLISECONDS);
|
}, 0, GameConstants.CYCLE_TIME, TimeUnit.MILLISECONDS);
|
||||||
|
|
||||||
|
try {
|
||||||
|
while (!scheduler.awaitTermination(60, TimeUnit.SECONDS)) {
|
||||||
|
// TODO
|
||||||
|
// Cleanup?
|
||||||
|
}
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
acceptor = null;
|
acceptor = null;
|
||||||
connectionHandler = null;
|
connectionHandler = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user