Skip to content

Commit

Permalink
Change LoginInboundConnection queue type to something that is actua…
Browse files Browse the repository at this point in the history
…lly thread-safe
  • Loading branch information
astei committed Sep 3, 2024
1 parent 862036d commit 52ae735
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
import io.netty.buffer.Unpooled;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import java.net.InetSocketAddress;
import java.util.ArrayDeque;
import java.util.Optional;
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
import net.kyori.adventure.text.Component;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
Expand All @@ -58,7 +58,7 @@ public class LoginInboundConnection implements LoginPhaseConnection, KeyIdentifi
InitialInboundConnection delegate) {
this.delegate = delegate;
this.outstandingResponses = Int2ObjectSyncMap.hashmap();
this.loginMessagesToSend = new ArrayDeque<>();
this.loginMessagesToSend = new ConcurrentLinkedQueue<>();
}

@Override
Expand Down

0 comments on commit 52ae735

Please sign in to comment.