We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38ff21a commit 7d68208Copy full SHA for 7d68208
1 file changed
proxy/src/main/java/com/velocitypowered/proxy/connection/client/InitialLoginSessionHandler.java
@@ -268,14 +268,8 @@ public boolean handle(EncryptionResponsePacket packet) {
268
inbound.disconnect(Component.translatable("multiplayer.disconnect.authservers_down"));
269
}
270
}, mcConnection.eventLoop())
271
- .thenRun(() -> {
272
- try {
273
- httpClient.close();
274
- } catch (Exception e) {
275
- // In Java 21, the HttpClient does not throw any Exception
276
- // when trying to clean its resources, so this should not happen
277
- logger.error("An unknown error occurred while trying to close an HttpClient", e);
278
- }
+ .whenComplete((ignored, throwable) -> {
+ httpClient.close();
279
});
280
} catch (GeneralSecurityException e) {
281
logger.error("Unable to enable encryption", e);
0 commit comments