Skip to content

Commit

Permalink
Fix ClientLoginNetworkAddon does not handle unsuccessful query responses
Browse files Browse the repository at this point in the history
  • Loading branch information
modmuss50 committed Oct 29, 2023
1 parent ee43962 commit 04a9750
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private boolean handlePacket(int queryId, Identifier channelName, PacketByteBuf
try {
CompletableFuture<@Nullable PacketByteBuf> future = handler.receive(this.client, this.handler, buf, futureListeners::add);
future.thenAccept(result -> {
LoginQueryResponseC2SPacket packet = new LoginQueryResponseC2SPacket(queryId, new PacketByteBufLoginQueryResponse(result));
LoginQueryResponseC2SPacket packet = new LoginQueryResponseC2SPacket(queryId, result == null ? null : new PacketByteBufLoginQueryResponse(result));
GenericFutureListener<? extends Future<? super Void>> listener = null;

for (GenericFutureListener<? extends Future<? super Void>> each : futureListeners) {
Expand Down

0 comments on commit 04a9750

Please sign in to comment.