Archiviert
13
0

Try to clean up after a failed hook.

Dieser Commit ist enthalten in:
Kristian S. Stangeland 2012-09-27 05:22:08 +02:00
Ursprung 240df9dc7a
Commit eb8abd4635

Datei anzeigen

@ -433,9 +433,18 @@ public final class PacketFilterManager implements ProtocolManager {
break; break;
} catch (Exception e) { } catch (Exception e) {
// Mark this injection attempt as a failure // Mark this injection attempt as a failure
logger.log(Level.SEVERE, "Player hook " + currentHook.toString() + " failed.", e); logger.log(Level.SEVERE, "Player hook " + currentHook.toString() + " failed.", e);
// Clean up as much as possible
try {
if (injector != null)
injector.cleanupAll();
} catch (Exception e2) {
logger.log(Level.WARNING, "Cleaing up after player hook failed.", e);
}
if (currentHook.ordinal() > 0) { if (currentHook.ordinal() > 0) {
// Choose the previous player hook type // Choose the previous player hook type
currentHook = PlayerInjectHooks.values()[currentHook.ordinal() - 1]; currentHook = PlayerInjectHooks.values()[currentHook.ordinal() - 1];