mirror of
https://github.com/PaperMC/Velocity.git
synced 2025-04-06 16:40:52 +08:00
Fix query listener reload bug (#1322)
This commit is contained in:
parent
a02b601b6c
commit
71bb0246a8
@ -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());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user