diff --git a/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java b/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java index 1a9d71cb..ef8217c6 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java @@ -469,11 +469,11 @@ public class VelocityServer implements ProxyServer, ForwardingAudience { boolean queryPortChanged = newConfiguration.getQueryPort() != configuration.getQueryPort(); boolean queryAlreadyEnabled = configuration.isQueryEnabled(); boolean queryEnabled = newConfiguration.isQueryEnabled(); - if ((!queryEnabled && queryAlreadyEnabled) || queryPortChanged) { + if (queryAlreadyEnabled && (!queryEnabled || queryPortChanged)) { this.cm.close(new InetSocketAddress( configuration.getBind().getHostString(), configuration.getQueryPort())); } - if (queryEnabled && queryPortChanged) { + if (queryEnabled && (!queryAlreadyEnabled || queryPortChanged)) { this.cm.queryBind(newConfiguration.getBind().getHostString(), newConfiguration.getQueryPort()); }