From 45ed30b2355841f1a645f84476cfc5971020209b Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sun, 1 Sep 2019 14:18:40 -0700 Subject: [PATCH] Fix #2511 (#2519) Did not double-flush the file io thread if async = false --- .../Asynchronous-chunk-IO-and-loading.patch | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Spigot-Server-Patches/Asynchronous-chunk-IO-and-loading.patch b/Spigot-Server-Patches/Asynchronous-chunk-IO-and-loading.patch index 7e20811b52..c9033f853b 100644 --- a/Spigot-Server-Patches/Asynchronous-chunk-IO-and-loading.patch +++ b/Spigot-Server-Patches/Asynchronous-chunk-IO-and-loading.patch @@ -1886,7 +1886,7 @@ index 000000000..1dfa8abfd +} diff --git a/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java new file mode 100644 -index 000000000..98a9744a0 +index 000000000..695e9909f --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java @@ -0,0 +0,0 @@ @@ -2239,11 +2239,10 @@ index 000000000..98a9744a0 + }); + wait.join(); + } -+ return; -+ } -+ -+ for (final QueueExecutorThread worker : this.workers) { -+ worker.flush(); ++ } else { ++ for (final QueueExecutorThread worker : this.workers) { ++ worker.flush(); ++ } + } + + // flush again since tasks we execute async saves