mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-29 13:04:59 +00:00
fix: Server Cookies
将删除Cookie的时间改成断开连接的时候。
This commit is contained in:
commit
133c340381
2 changed files with 2 additions and 2 deletions
|
|
@ -210,6 +210,7 @@ namespace MinecraftClient
|
|||
public void GetCookie(string key, out byte[]? data) => Cookies.TryGetValue(key, out data);
|
||||
public void SetCookie(string key, byte[] data) => Cookies[key] = data;
|
||||
public void DeleteCookie(string key) => Cookies.Remove(key, out var data);
|
||||
public void DeleteAllCookies() => Cookies?.Clear();
|
||||
public (Location location, string material, string typeLabel, string[] frontText, string[] backText, bool isWaxed)[] GetKnownSigns()
|
||||
{
|
||||
lock (signDataLock)
|
||||
|
|
|
|||
|
|
@ -4101,6 +4101,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
finally
|
||||
{
|
||||
socketWrapper.Disconnect();
|
||||
McClient.Instance?.DeleteAllCookies();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6685,8 +6686,6 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
SendPacket(PacketTypesOut.CookieResponse, packet);
|
||||
break;
|
||||
}
|
||||
|
||||
McClient.Instance?.DeleteCookie(name);
|
||||
return true;
|
||||
}
|
||||
catch (SocketException)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue