13
0
geforkt von Mirrors/Velocity

Fix query listener reload bug (#1322)

Dieser Commit ist enthalten in:
Pantera (Mad_Daniel) 2024-05-24 03:12:28 +09:00 committet von GitHub
Ursprung a02b601b6c
Commit 71bb0246a8
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194

Datei anzeigen

@ -469,11 +469,11 @@ public class VelocityServer implements ProxyServer, ForwardingAudience {
boolean queryPortChanged = newConfiguration.getQueryPort() != configuration.getQueryPort(); boolean queryPortChanged = newConfiguration.getQueryPort() != configuration.getQueryPort();
boolean queryAlreadyEnabled = configuration.isQueryEnabled(); boolean queryAlreadyEnabled = configuration.isQueryEnabled();
boolean queryEnabled = newConfiguration.isQueryEnabled(); boolean queryEnabled = newConfiguration.isQueryEnabled();
if ((!queryEnabled && queryAlreadyEnabled) || queryPortChanged) { if (queryAlreadyEnabled && (!queryEnabled || queryPortChanged)) {
this.cm.close(new InetSocketAddress( this.cm.close(new InetSocketAddress(
configuration.getBind().getHostString(), configuration.getQueryPort())); configuration.getBind().getHostString(), configuration.getQueryPort()));
} }
if (queryEnabled && queryPortChanged) { if (queryEnabled && (!queryAlreadyEnabled || queryPortChanged)) {
this.cm.queryBind(newConfiguration.getBind().getHostString(), this.cm.queryBind(newConfiguration.getBind().getHostString(),
newConfiguration.getQueryPort()); newConfiguration.getQueryPort());
} }