mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-01 21:11:33 +01:00
Fix server shutdown
This commit is contained in:
parent
1591df16aa
commit
09b7daa985
@ -39,13 +39,13 @@ public final class UpdateManager {
|
|||||||
/**
|
/**
|
||||||
* Should only be created in MinecraftServer.
|
* Should only be created in MinecraftServer.
|
||||||
*/
|
*/
|
||||||
protected UpdateManager() {
|
UpdateManager() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts the server loop in the update thread.
|
* Starts the server loop in the update thread.
|
||||||
*/
|
*/
|
||||||
protected void start() {
|
void start() {
|
||||||
final ConnectionManager connectionManager = MinecraftServer.getConnectionManager();
|
final ConnectionManager connectionManager = MinecraftServer.getConnectionManager();
|
||||||
|
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
@ -95,6 +95,7 @@ public final class UpdateManager {
|
|||||||
MinecraftServer.getExceptionManager().handleException(e);
|
MinecraftServer.getExceptionManager().handleException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.threadProvider.shutdown();
|
||||||
}, MinecraftServer.THREAD_NAME_TICK_SCHEDULER).start();
|
}, MinecraftServer.THREAD_NAME_TICK_SCHEDULER).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -241,6 +242,5 @@ public final class UpdateManager {
|
|||||||
*/
|
*/
|
||||||
public void stop() {
|
public void stop() {
|
||||||
this.stopRequested = true;
|
this.stopRequested = true;
|
||||||
this.threadProvider.shutdown();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user