Don't attempt to clean up static members during an update.

This commit is contained in:
Kristian S. Stangeland 2013-02-07 20:07:33 +01:00
parent 32282bbe9f
commit bc1955bff3

View File

@ -40,6 +40,7 @@ import com.comphenix.protocol.injector.PacketFilterManager;
import com.comphenix.protocol.injector.PacketFilterManager.PlayerInjectHooks;
import com.comphenix.protocol.metrics.Statistics;
import com.comphenix.protocol.metrics.Updater;
import com.comphenix.protocol.metrics.Updater.UpdateResult;
import com.comphenix.protocol.reflect.compiler.BackgroundCompiler;
/**
@ -430,9 +431,11 @@ public class ProtocolLibrary extends JavaPlugin {
reporter = null;
// Leaky ClassLoader begone!
if (updater == null || updater.getResult() != UpdateResult.SUCCESS) {
CleanupStaticMembers cleanup = new CleanupStaticMembers(getClassLoader(), reporter);
cleanup.resetAll();
}
}
// Get the Bukkit logger first, before we try to create our own
private Logger getLoggerSafely() {