Expose shutdownInProgress to the API. (#1485)
Co-authored-by: kyngs <kyngs@users.noreply.github.com>
This commit is contained in:
@@ -41,6 +41,13 @@ public interface ProxyServer extends Audience {
|
|||||||
*/
|
*/
|
||||||
void shutdown();
|
void shutdown();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether the proxy is currently shutting down.
|
||||||
|
*
|
||||||
|
* @return {@code true} if the proxy is shutting down, {@code false} otherwise
|
||||||
|
*/
|
||||||
|
boolean isShuttingDown();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Closes all listening endpoints for this server.
|
* Closes all listening endpoints for this server.
|
||||||
* This includes the main minecraft listener and query channel.
|
* This includes the main minecraft listener and query channel.
|
||||||
|
@@ -804,6 +804,11 @@ public class VelocityServer implements ProxyServer, ForwardingAudience {
|
|||||||
return channelRegistrar;
|
return channelRegistrar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isShuttingDown() {
|
||||||
|
return shutdownInProgress.get();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public InetSocketAddress getBoundAddress() {
|
public InetSocketAddress getBoundAddress() {
|
||||||
if (configuration == null) {
|
if (configuration == null) {
|
||||||
|
Reference in New Issue
Block a user