MCCTeam / Minecraft-Console-Client

Lightweight console for Minecraft chat and automated scripts
https://mccteam.github.io
Other
1.67k stars 402 forks source link

[BUG] Reconnect Bug #2691

Closed Nekiplay closed 8 months ago

Nekiplay commented 8 months ago

Prerequisites

Minecraft Version

1.20.2

Console Client Version

https://github.com/MCCTeam/Minecraft-Console-Client/commit/9a147b57e5cab19ce7fe60d4510435220c1c5cee

Expected Behavior

Auto Recoonect

Actual Behavior

Failed to connect to the server when the connection was lost

Tests on local server: https://youtu.be/kkIDtEnwb-c

Steps to Reproduce the bug

  1. Server restart
  2. Reconecting
  3. Loss of connection
  4. Work stoppage

Attach screenshot here (If applicable)

7kAwfBFq8k

Anythings that could help diagnosing the bug

[ChatBot.AutoRelog]
Enabled = true
Delay = { min = 10.0, max = 16.0 }          # The delay time before joining the server. (in seconds)
Retries = 2147483647                        # Retries when failing to relog to the server. use -1 for unlimited retries.
Ignore_Kick_Message = true                  # When set to true, autorelog will reconnect regardless of kick messages.
# If the kickout message matches any of the strings, then autorelog will be triggered.
Kick_Messages = [ "connection has been lost", "server is restarting", "server is full", "too many people", ]

Device

Desktop

Operating System

Windows

Server Address (If applicable)

play.oldfrog.org

Nekiplay commented 8 months ago

I add Tests on local server: https://youtu.be/kkIDtEnwb-c

milutinke commented 8 months ago

@BruceChenQAQ If you have some time, could you look at this, since you were the last one to change this part of the code?

breadbyte commented 8 months ago

@Nekiplay can you try with this version?

https://github.com/breadbyte/Minecraft-Console-Client/releases/tag/20240307-106

Nekiplay commented 8 months ago

@Nekiplay can you try with this version?

https://github.com/breadbyte/Minecraft-Console-Client/releases/tag/20240307-106

So far so good.

breadbyte commented 8 months ago

If everything looks fine until now, I will merge the pull request later in the day (in a couple hours)