Skip to content

Commit

Permalink
Don't attempt to clean up static members during an update.
Browse files Browse the repository at this point in the history
  • Loading branch information
aadnk committed Feb 7, 2013
1 parent 32282bb commit bc1955b
Showing 1 changed file with 5 additions and 2 deletions.
Expand Up @@ -40,6 +40,7 @@
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;

/**
Expand Down Expand Up @@ -430,8 +431,10 @@ public void onDisable() {
reporter = null;

// Leaky ClassLoader begone!
CleanupStaticMembers cleanup = new CleanupStaticMembers(getClassLoader(), reporter);
cleanup.resetAll();
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
Expand Down

0 comments on commit bc1955b

Please sign in to comment.