geforkt von Mirrors/Velocity
Rename ConnectionManager#shutdown(ISA) -> ConnectionManager#close(ISA)
Dieser Commit ist enthalten in:
Ursprung
1515c5069b
Commit
9a9b6f9ab3
@ -3,7 +3,6 @@ package com.velocitypowered.proxy;
|
|||||||
import com.google.common.base.MoreObjects;
|
import com.google.common.base.MoreObjects;
|
||||||
import com.google.common.base.Preconditions;
|
import com.google.common.base.Preconditions;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.ImmutableSet;
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
import com.velocitypowered.api.event.EventManager;
|
import com.velocitypowered.api.event.EventManager;
|
||||||
@ -57,7 +56,6 @@ import java.util.UUID;
|
|||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.CountDownLatch;
|
import java.util.concurrent.CountDownLatch;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
|
||||||
import net.kyori.text.Component;
|
import net.kyori.text.Component;
|
||||||
import net.kyori.text.TextComponent;
|
import net.kyori.text.TextComponent;
|
||||||
import net.kyori.text.serializer.GsonComponentSerializer;
|
import net.kyori.text.serializer.GsonComponentSerializer;
|
||||||
@ -299,12 +297,12 @@ public class VelocityServer implements ProxyServer {
|
|||||||
// If we have a new bind address, bind to it
|
// If we have a new bind address, bind to it
|
||||||
if (!configuration.getBind().equals(newConfiguration.getBind())) {
|
if (!configuration.getBind().equals(newConfiguration.getBind())) {
|
||||||
this.cm.bind(newConfiguration.getBind());
|
this.cm.bind(newConfiguration.getBind());
|
||||||
this.cm.shutdown(configuration.getBind());
|
this.cm.close(configuration.getBind());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (configuration.isQueryEnabled() && (!newConfiguration.isQueryEnabled()
|
if (configuration.isQueryEnabled() && (!newConfiguration.isQueryEnabled()
|
||||||
|| newConfiguration.getQueryPort() != configuration.getQueryPort())) {
|
|| newConfiguration.getQueryPort() != configuration.getQueryPort())) {
|
||||||
this.cm.shutdown(new InetSocketAddress(
|
this.cm.close(new InetSocketAddress(
|
||||||
configuration.getBind().getHostString(), configuration.getQueryPort()));
|
configuration.getBind().getHostString(), configuration.getQueryPort()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ public final class ConnectionManager {
|
|||||||
this.server.getConfiguration().getConnectTimeout());
|
this.server.getConfiguration().getConnectTimeout());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void shutdown(InetSocketAddress oldBind) {
|
public void close(InetSocketAddress oldBind) {
|
||||||
Channel serverChannel = endpoints.remove(oldBind);
|
Channel serverChannel = endpoints.remove(oldBind);
|
||||||
Preconditions.checkState(serverChannel != null, "Endpoint %s not registered", oldBind);
|
Preconditions.checkState(serverChannel != null, "Endpoint %s not registered", oldBind);
|
||||||
LOGGER.info("Closing endpoint {}", serverChannel.localAddress());
|
LOGGER.info("Closing endpoint {}", serverChannel.localAddress());
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren