1
0
mirror of https://github.com/cabaletta/baritone synced 2024-12-17 20:55:09 +00:00

orderly shutdown

This commit is contained in:
Leijurv 2023-07-31 15:06:25 -07:00
parent 64a881f990
commit 46f38f2ce7
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -467,6 +467,11 @@ public final class ElytraBehavior implements Helper {
this.solver.cancel(true);
}
this.solverExecutor.shutdown();
try {
while (!this.solverExecutor.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS)) {}
} catch (InterruptedException e) {
e.printStackTrace();
}
this.context.destroy();
}