mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2025-04-08 04:55:55 +02:00
Tentative fix for webserver not closing for 10 seconds when bluemap unloads
This commit is contained in:
parent
5a75b330f5
commit
3b37be432c
@ -112,6 +112,14 @@ public void run(){
|
||||
}
|
||||
|
||||
public synchronized void close(){
|
||||
try {
|
||||
if (server != null && !server.isClosed()){
|
||||
server.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
Logger.global.logError("Error while closing WebServer!", e);
|
||||
}
|
||||
|
||||
if (connectionThreads != null) {
|
||||
connectionThreads.shutdown();
|
||||
try {
|
||||
@ -122,14 +130,6 @@ public synchronized void close(){
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
if (server != null && !server.isClosed()){
|
||||
server.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
Logger.global.logError("Error while closing WebServer!", e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user