mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
fix: preserve queued disconnect reason
This commit is contained in:
parent
6e4bca5073
commit
eea631f69e
1 changed files with 4 additions and 1 deletions
|
|
@ -304,7 +304,10 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
{
|
||||
Stopwatch stopWatch = Stopwatch.StartNew();
|
||||
long nextUpdateDue = 0;
|
||||
while (!packetQueue.IsAddingCompleted)
|
||||
// Continue until the reader has finished and every queued packet has been handled.
|
||||
// A server can close immediately after a Disconnect packet, completing the queue
|
||||
// while that final packet is still waiting to be processed.
|
||||
while (!packetQueue.IsCompleted)
|
||||
{
|
||||
cancelToken.ThrowIfCancellationRequested();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue