Skip to content

This solves issue #3134.#3169

Closed
Somersault41 wants to merge 2 commits into
MCCTeam:masterfrom
Somersault41:master
Closed

This solves issue #3134.#3169
Somersault41 wants to merge 2 commits into
MCCTeam:masterfrom
Somersault41:master

Conversation

@Somersault41

Copy link
Copy Markdown

Problems:

  1. The AutoRelog ChatBot stopped trying to log in after the 3rd attempt.
  2. The AutoRelog ChatBot stopped trying to log in after the internet connection was interrupted. MCC froze.

2 problems have been solved.
This solves issue #3134.

1) The AutoRelog ChatBot stopped trying to log in after the 3rd attempt.
2) The AutoRelog ChatBot stopped trying to log in after the internet connection was interrupted. MCC froze.

2 problems have been solved.
@milutinke

milutinke commented Jul 19, 2026

Copy link
Copy Markdown
Member

There are some good changes here. The zero-byte socket read should prevent packet-reading loops after a clean disconnect, and the protocol cleanup is more reliable when cancellation throws.

However, the reconnect changes introduce serious problems:

  • RequestImmediateInput() returns an empty string after one second. In "classic" console mode, the offline prompt treats that as an exit request, so MCC can terminate without any user input.
  • Each timeout starts another blocked Task.Run(). These tasks are not cancelled or tracked, and TUI mode also accumulates handlers. BasicIO still blocks indefinitely.
  • disconnectInProgress only avoids the script-bot deadlock when the threads happen to run in a particular order. It does not fix the underlying synchronization problem. When it skips the deadlock, it also skips bot unloading and other cleanup, which can leak resources across reconnects.
  • The new background console-stop thread is untracked and can race with another reconnect or a newly started session. Swallowed exceptions make these failures difficult to diagnose.-
  • Restart requests can be replayed after a successful reconnect, causing MCC to disconnect and reconnect again unexpectedly. The restart-generation field is currently unused.
  • The kick-message comparison uses ToLowerInvariant() on one side and culture-sensitive ToLower() on the other, which can break matching for some locales.
  • The configuration locking changes are unrelated to the reported issue, add substantial complexity, and can block forever while saving settings.

So I cannot merge this in this state.
I got some gist of what the issue is actually, and I'll try fixing it and debugging it myself, as well as sending you a build to test, as I use Linux and macOS.

Thank you for your contribution.

Edit: And I'll fix the merge issue.

@milutinke

Copy link
Copy Markdown
Member

@Somersault41

Somersault41 commented Jul 19, 2026

Copy link
Copy Markdown
Author

It didn't work. MCC is crashing.

Minecraft Konsol İstemcisi v26.2 - MC 1.4.6 için 26.2 - Github.com/MCCTeam
16:07:43 GitHub build 481, built on 2026-07-19 from commit 64c1dc5
MCCyi çevirmemize yardımcı olun: https://crowdin.com/project/minecraft-console-client
16:07:43 Çevrimdışı modda giriş yaptınız.
16:07:43 Minecraft 1.20.4 sürümü kullanılıyor (protokol v765)
16:07:44 [MCC] Sürüm destekleniyor.
Giriş yapılıyor...
16:07:44 [MCC] Giriş başarısız :
16:07:44 [MCC] You are logging in too fast, try again later.
16:07:44 [ERROR] Bu sunucuda oturum açılamadı.
16:07:44 Geçerli ayarlar RealSaruhanAFK.ini dosyasına kaydediliyor
16:07:44 Geçerli ayarlar RealSaruhanAFK.ini dosyasına kaydediliyor

Sometimes it says it's saving to the .ini file twice, sometimes only once.
Note: I am opening more than one MCC at the same time.

It crashes when the internet connection is lost. AutoRelog doesn't work at all. It said it would be saved to the .ini file once. It didn't say it twice. It's not freezing anymore, it's collapsing.

@Somersault41

Somersault41 commented Jul 20, 2026

Copy link
Copy Markdown
Author

@milutinke The application crashes when the ExitOnFailure value is set to true. It doesn't crash when I set it to false.
I hadn't noticed that the ExitOnFailure setting was true. I've now set it to false and it's working fine. Sorry for overlooking it. The problem is fixed.

@milutinke

Copy link
Copy Markdown
Member

Ok, Awesome. I've merged my fix. Thanks for the feedback.

@milutinke milutinke closed this Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants