9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-29 03:59:06 +00:00

Post shutdown fixes

This commit is contained in:
cyberpwn
2021-08-18 14:08:28 -04:00
parent a09e77a17d
commit 059d5542c9
3 changed files with 32 additions and 15 deletions

View File

@@ -159,16 +159,30 @@ public class MultiBurst {
public void shutdownLater() {
if (service != null) {
service.submit(() -> {
J.sleep(3000);
try
{
service.submit(() -> {
J.sleep(3000);
Iris.debug("Shutting down MultiBurst Pool " + heartbeat.getName() + ".");
if (service != null) {
service.shutdown();
}
});
heartbeat.interrupt();
}
catch(Throwable e)
{
Iris.debug("Shutting down MultiBurst Pool " + heartbeat.getName() + ".");
if (service != null) {
service.shutdown();
}
});
heartbeat.interrupt();
heartbeat.interrupt();
}
}
}

View File

@@ -18,10 +18,16 @@
package com.volmit.iris.util.plugin;
import com.volmit.iris.Iris;
import org.bukkit.event.Listener;
public interface IrisService extends Listener {
void onEnable();
void onDisable();
default void postShutdown(Runnable r)
{
Iris.instance.postShutdown(r);
}
}