mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Bug fix: Can't reconnect after connection lost
This commit is contained in:
parent
db64515b78
commit
98dd645fb5
4 changed files with 31 additions and 18 deletions
|
|
@ -446,6 +446,8 @@ namespace MinecraftClient
|
|||
/// </summary>
|
||||
public void OnConnectionLost(ChatBot.DisconnectReason reason, string message)
|
||||
{
|
||||
handler.Dispose();
|
||||
|
||||
world.Clear();
|
||||
|
||||
if (timeoutdetector != null)
|
||||
|
|
@ -761,7 +763,7 @@ namespace MinecraftClient
|
|||
int callingThreadId = Thread.CurrentThread.ManagedThreadId;
|
||||
if (handler != null)
|
||||
{
|
||||
return handler.GetNetReadThreadId() != callingThreadId;
|
||||
return handler.GetNetMainThreadId() != callingThreadId;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue