Wait for GameClient closeNow packet to be sent.

This commit is contained in:
MobiusDevelopment
2023-06-28 06:48:54 +03:00
parent 4bd9210c69
commit 7a8a4f12d1
31 changed files with 434 additions and 31 deletions

View File

@ -105,7 +105,20 @@ public class GameClient extends NetClient
public void close(ServerPacket packet)
{
sendPacket(packet);
if (packet != null)
{
sendPacket(packet);
// Wait for packet to be sent.
try
{
Thread.sleep(1000);
}
catch (InterruptedException e)
{
}
}
closeNow();
}