From fc3c944e3d9508c0ab9694e62f036fd6d70168cf Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sat, 14 Dec 2024 23:35:29 -0600 Subject: [PATCH] remove timeout from chunk IoWorker in world gen --- .../BatchGenerationEnvironment.java | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/BatchGenerationEnvironment.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/BatchGenerationEnvironment.java index 95a4c466b..318aabffc 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/BatchGenerationEnvironment.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/worldGeneration/BatchGenerationEnvironment.java @@ -629,13 +629,9 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv return CompletableFuture.completedFuture(ioWorker.load(chunkPos)); #else - // timeout should prevent locking up the thread if the ioWorker dies or has issues - int maxGetTimeInSec = 60 * 3; // 3 minutes (same as old timeout config default) - // when running in vanilla MC, loadAsync will run on this same thread due to a vanilla threading mixin, // however if a mod like C2ME is installed this will run on a C2ME thread instead return ioWorker.loadAsync(chunkPos) - .orTimeout(maxGetTimeInSec, TimeUnit.SECONDS) .thenApply(optional -> optional.orElse(null)) .exceptionally((throwable) -> { @@ -646,15 +642,7 @@ public final class BatchGenerationEnvironment extends AbstractBatchGenerationEnv actualThrowable = completionException.getCause(); } - if (actualThrowable instanceof TimeoutException) - { - LOAD_LOGGER.warn("Unable to get chunk at pos ["+chunkPos+"] after ["+maxGetTimeInSec+"] milliseconds.", actualThrowable); - } - else - { - LOAD_LOGGER.warn("DistantHorizons: Couldn't load or make chunk ["+chunkPos+"], error: ["+actualThrowable.getMessage()+"].", actualThrowable); - } - + LOAD_LOGGER.warn("DistantHorizons: Couldn't load or make chunk ["+chunkPos+"], error: ["+actualThrowable.getMessage()+"].", actualThrowable); return null; }); #endif