3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-16 21:10:30 +01:00

Fix GS4 query reloading logic

Closes #915. This isn't a fatal error, but it's a clear papercut.
Dieser Commit ist enthalten in:
Andrew Steinborn 2023-01-01 13:07:31 -05:00
Ursprung f62768be9a
Commit ffa4c95435

Datei anzeigen

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