diff --git a/Projects/UOContent.Tests/Tests/Network/Packets/AuthIdTests.cs b/Projects/UOContent.Tests/Tests/Network/Packets/AuthIdTests.cs index 799651beb..aecf8b9ef 100644 --- a/Projects/UOContent.Tests/Tests/Network/Packets/AuthIdTests.cs +++ b/Projects/UOContent.Tests/Tests/Network/Packets/AuthIdTests.cs @@ -196,9 +196,8 @@ public class AuthIdTests : IDisposable } /// - /// Picking a second server on the same connection orphans the first id -- the NetState now - /// holds the new one, so nothing will ever redeem the old. It goes immediately rather than - /// waiting to time out. + /// A connection is capped at one live id. NetState.AuthId only holds the newest, so any id it + /// replaces goes immediately rather than sitting in the window with nothing coming for it. /// [Fact] public void ReleasingAnIdMakesItUnredeemableImmediately() diff --git a/Projects/UOContent/Network/Packets/IncomingAccountPackets.cs b/Projects/UOContent/Network/Packets/IncomingAccountPackets.cs index 2d9cec12b..79fb67b99 100644 --- a/Projects/UOContent/Network/Packets/IncomingAccountPackets.cs +++ b/Projects/UOContent/Network/Packets/IncomingAccountPackets.cs @@ -348,9 +348,10 @@ public static class IncomingAccountPackets private static int GenerateAuthID(this NetState state) { - // Picking a second server on the same connection orphans the first id: state.AuthId now - // holds the new one, so nothing is coming to redeem the old. Drop it now instead of leaving - // it to time out. + // Caps a connection at one live id. Choosing a server queues a disconnect, but the queue is + // drained on the next slice, so a client that pipelines another seed/login/select into the + // same buffer gets here again -- and state.AuthId only holds the newest, so the previous id + // would sit in the window until it timed out with nothing coming to redeem it. ReleaseAuthId(state.AuthId); return RegisterAuthId(state.Account, state.Address, state.Version);