mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
AutoRelog McClient.cs
This commit is contained in:
parent
b0f003fd58
commit
745678e869
1 changed files with 27 additions and 2 deletions
|
|
@ -551,8 +551,33 @@ namespace MinecraftClient
|
||||||
|
|
||||||
if (!consoleReadThreadOwned)
|
if (!consoleReadThreadOwned)
|
||||||
{
|
{
|
||||||
ConsoleIO.Backend.BeginReadThread();
|
try
|
||||||
consoleReadThreadOwned = true;
|
{
|
||||||
|
ConsoleIO.Backend.BeginReadThread();
|
||||||
|
consoleReadThreadOwned = true;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ConsoleIO.Backend.StopReadThread();
|
||||||
|
}
|
||||||
|
catch (Exception stopEx)
|
||||||
|
{
|
||||||
|
ConsoleIO.WriteLineFormatted($"§c[MCC] Failed to stop stale console input thread during reconnect: {stopEx.Message}");
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
ConsoleIO.Backend.BeginReadThread();
|
||||||
|
consoleReadThreadOwned = true;
|
||||||
|
}
|
||||||
|
catch (Exception retryEx)
|
||||||
|
{
|
||||||
|
ConsoleIO.WriteLineFormatted($"§c[MCC] Failed to start console input thread after reconnect retry: {retryEx.Message}");
|
||||||
|
consoleReadThreadOwned = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!consoleHandlersAttached)
|
if (!consoleHandlersAttached)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue