mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +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)
|
||||
{
|
||||
OnConnectionLost(ChatBot.DisconnectReason.ConnectionLost, "Connection Timeout");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -481,7 +482,8 @@ namespace MinecraftClient
|
|||
|
||||
if (timeoutdetector != null)
|
||||
{
|
||||
timeoutdetector.Abort();
|
||||
if (Thread.CurrentThread != timeoutdetector)
|
||||
timeoutdetector.Abort();
|
||||
timeoutdetector = null;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue