Skip to content

Commit

Permalink
Expose shutdownInProgress to the API. (#1485)
Browse files Browse the repository at this point in the history
Co-authored-by: kyngs <[email protected]>
  • Loading branch information
kyngs and kyngs authored Jan 26, 2025
1 parent 371e686 commit 6995f41
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ public interface ProxyServer extends Audience {
*/
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.
* This includes the main minecraft listener and query channel.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,11 @@ public VelocityScheduler getScheduler() {
public VelocityChannelRegistrar getChannelRegistrar() {
return channelRegistrar;
}

@Override
public boolean isShuttingDown() {
return shutdownInProgress.get();
}

@Override
public InetSocketAddress getBoundAddress() {
Expand Down

0 comments on commit 6995f41

Please sign in to comment.