mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Fix TimeoutDetector killing itself (#1219)
This commit is contained in:
parent
e6bd2090ab
commit
a6a5f0c333
1 changed files with 3 additions and 1 deletions
|
|
@ -335,6 +335,7 @@ namespace MinecraftClient
|
||||||
if (lastKeepAlive.AddSeconds(30) < DateTime.Now)
|
if (lastKeepAlive.AddSeconds(30) < DateTime.Now)
|
||||||
{
|
{
|
||||||
OnConnectionLost(ChatBot.DisconnectReason.ConnectionLost, "Connection Timeout");
|
OnConnectionLost(ChatBot.DisconnectReason.ConnectionLost, "Connection Timeout");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -481,6 +482,7 @@ namespace MinecraftClient
|
||||||
|
|
||||||
if (timeoutdetector != null)
|
if (timeoutdetector != null)
|
||||||
{
|
{
|
||||||
|
if (Thread.CurrentThread != timeoutdetector)
|
||||||
timeoutdetector.Abort();
|
timeoutdetector.Abort();
|
||||||
timeoutdetector = null;
|
timeoutdetector = null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue