Skip to content

Commit

Permalink
Do not print an exception if a client closed before switching to conf…
Browse files Browse the repository at this point in the history
…ig state
  • Loading branch information
electronicboy committed Feb 13, 2025
1 parent 9d1332d commit f986eb5
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1287,6 +1287,11 @@ private boolean sendKeepAliveToBackend(final @Nullable VelocityServerConnection
public void switchToConfigState() {
server.getEventManager().fire(new PlayerEnterConfigurationEvent(this, getConnectionInFlightOrConnectedServer()))
.completeOnTimeout(null, 5, TimeUnit.SECONDS).thenRunAsync(() -> {
// if the connection was closed earlier, there is a risk that the player is no longer connected
if (!connection.getChannel().isActive()) {
return;
}
if (bundleHandler.isInBundleSession()) {
bundleHandler.toggleBundleSession();
connection.write(BundleDelimiterPacket.INSTANCE);
Expand Down

0 comments on commit f986eb5

Please sign in to comment.