From 4d2cffa69ef8f218a3588edd852f69bd0d810b1d Mon Sep 17 00:00:00 2001 From: kaczy Date: Fri, 8 Nov 2024 08:10:42 +0100 Subject: [PATCH] Fix client disconnect --- Client/CentrEDClient.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Client/CentrEDClient.cs b/Client/CentrEDClient.cs index 32f3b9f..3e555cc 100644 --- a/Client/CentrEDClient.cs +++ b/Client/CentrEDClient.cs @@ -84,11 +84,13 @@ public void Disconnect() { Send(new QuitPacket()); while (NetState.FlushPending) + { NetState.Flush(); - } - while (NetState.Receive()) - { - //Let it read everything + } + while (NetState.Receive()) + { + //Let it read everything + } } }