mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-22 10:35:16 +01:00
Dont let render-threads die. If an error occurs, let them wait for a while, then resurrect them
This commit is contained in:
parent
ca4fec8c1a
commit
7405520713
@ -161,11 +161,19 @@ private void renderThread() {
|
||||
}
|
||||
|
||||
if (ticket != null) {
|
||||
ticket.render();
|
||||
try {
|
||||
ticket.render();
|
||||
} catch (Exception e) {
|
||||
//catch possible runtime exceptions, display them, and wait a while .. then resurrect this render-thread
|
||||
Logger.global.logError("Unexpected exception in render-thread!", e);
|
||||
try {
|
||||
Thread.sleep(10000);
|
||||
} catch (InterruptedException interrupt) { break; }
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
Thread.sleep(1000); // we don't need a super fast response time, so waiting a second is totally fine
|
||||
} catch (InterruptedException e) { break; }
|
||||
} catch (InterruptedException interrupt) { break; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user