Prevent server crash on shutdown

This commit is contained in:
s809
2024-10-05 21:29:58 +05:00
parent c1a405b755
commit 38d7ca4bec
@@ -99,7 +99,12 @@ public class SharedApi
{
ThreadPoolUtil.shutdownThreadPools();
DebugRenderer.clearRenderables();
MC_RENDER.clearTargetFrameBuffer();
if (MC_RENDER != null)
{
MC_RENDER.clearTargetFrameBuffer();
}
// shouldn't be necessary, but if we missed closing one of the connections this should make sure they're all closed
AbstractDhRepo.closeAllConnections();
// needs to be closed on world shutdown to clear out un-processed chunks