9
0
mirror of https://github.com/WiIIiam278/HuskSync.git synced 2025-12-23 08:39:19 +00:00

sync: Terminate syncer connection before redis

This commit is contained in:
William
2023-10-08 23:02:27 +01:00
parent 2c33f3b0b4
commit 6d9e68a65b

View File

@@ -194,12 +194,12 @@ public class BukkitHuskSync extends JavaPlugin implements HuskSync, BukkitTask.S
this.disabling = true; this.disabling = true;
// Close the event listener / data syncer // Close the event listener / data syncer
if (this.eventListener != null) {
this.eventListener.handlePluginDisable();
}
if (this.dataSyncer != null) { if (this.dataSyncer != null) {
this.dataSyncer.terminate(); this.dataSyncer.terminate();
} }
if (this.eventListener != null) {
this.eventListener.handlePluginDisable();
}
// Unregister API and cancel tasks // Unregister API and cancel tasks
BukkitHuskSyncAPI.unregister(); BukkitHuskSyncAPI.unregister();