Skip to content

Commit

Permalink
Sneak a mysql fix in
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytv committed Jun 17, 2020
1 parent 4739176 commit 36e561c
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import java.util.Set;

public final class SettingsProxy extends Settings {
private final MaintenanceProxyPlugin plugin;
private final MaintenanceProxyPlugin proxyPlugin;
private Set<String> maintenanceServers;
private List<String> fallbackServers;
private String waitingServer;
Expand All @@ -49,7 +49,7 @@ public final class SettingsProxy extends Settings {

public SettingsProxy(final MaintenanceProxyPlugin plugin) {
super(plugin);
this.plugin = plugin;
this.proxyPlugin = plugin;
}

private void setupMySQL() throws Exception {
Expand Down Expand Up @@ -134,12 +134,12 @@ public boolean isMaintenance(final String serverName) {
// Enable maintenance on yet unlisted servers
for (final String s : databaseValue) {
if (!maintenanceServers.contains(s))
plugin.serverActions(plugin.getServer(s), true);
proxyPlugin.serverActions(proxyPlugin.getServer(s), true);
}
// Disable maintenance on now unlisted servers
for (final String s : maintenanceServers) {
if (!databaseValue.contains(s))
plugin.serverActions(plugin.getServer(s), false);
proxyPlugin.serverActions(proxyPlugin.getServer(s), false);
}
maintenanceServers = databaseValue;
}
Expand Down Expand Up @@ -245,7 +245,7 @@ public Set<String> getMaintenanceServers() {
@Nullable
public Server getFallbackServer() {
for (final String fallbackServer : fallbackServers) {
final Server server = plugin.getServer(fallbackServer);
final Server server = proxyPlugin.getServer(fallbackServer);
if (server != null && !isMaintenance(server.getName())) {
return server;
}
Expand Down

0 comments on commit 36e561c

Please sign in to comment.