Try to fix issue with extra server tasks

I don't think there's a cleaner way to pop these off.
This commit is contained in:
Octavia Togami 2020-06-23 14:11:22 -07:00
parent df3937256e
commit 3db43c88c0
No known key found for this signature in database
GPG Key ID: CC364524D1983C99

View File

@ -309,6 +309,11 @@ private void doRegen(Region region, EditSession editSession) throws Exception {
false false
)) { )) {
regenForWorld(region, editSession, serverWorld); regenForWorld(region, editSession, serverWorld);
// drive the server executor until all tasks are popped off
while (originalWorld.getServer().runTask()) {
Thread.yield();
}
} }
} finally { } finally {
FileUtils.deleteDirectory(tempDir.toFile()); FileUtils.deleteDirectory(tempDir.toFile());