From 9a9b6f9ab39b77354d618c545c28795be641bb6d Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Sat, 24 Nov 2018 21:38:26 -0500 Subject: [PATCH] Rename ConnectionManager#shutdown(ISA) -> ConnectionManager#close(ISA) --- .../main/java/com/velocitypowered/proxy/VelocityServer.java | 6 ++---- .../velocitypowered/proxy/network/ConnectionManager.java | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java b/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java index 3aea20f4e..b9d061ba5 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/VelocityServer.java @@ -3,7 +3,6 @@ package com.velocitypowered.proxy; import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableSet; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.velocitypowered.api.event.EventManager; @@ -57,7 +56,6 @@ import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicBoolean; -import java.util.concurrent.atomic.AtomicInteger; import net.kyori.text.Component; import net.kyori.text.TextComponent; 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 (!configuration.getBind().equals(newConfiguration.getBind())) { this.cm.bind(newConfiguration.getBind()); - this.cm.shutdown(configuration.getBind()); + this.cm.close(configuration.getBind()); } if (configuration.isQueryEnabled() && (!newConfiguration.isQueryEnabled() || newConfiguration.getQueryPort() != configuration.getQueryPort())) { - this.cm.shutdown(new InetSocketAddress( + this.cm.close(new InetSocketAddress( configuration.getBind().getHostString(), configuration.getQueryPort())); } diff --git a/proxy/src/main/java/com/velocitypowered/proxy/network/ConnectionManager.java b/proxy/src/main/java/com/velocitypowered/proxy/network/ConnectionManager.java index 26296a2bc..a0ff135c1 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/network/ConnectionManager.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/network/ConnectionManager.java @@ -94,7 +94,7 @@ public final class ConnectionManager { this.server.getConfiguration().getConnectTimeout()); } - public void shutdown(InetSocketAddress oldBind) { + public void close(InetSocketAddress oldBind) { Channel serverChannel = endpoints.remove(oldBind); Preconditions.checkState(serverChannel != null, "Endpoint %s not registered", oldBind); LOGGER.info("Closing endpoint {}", serverChannel.localAddress());