fix(serverinfo): clear stale messages on ed2k disconnect - #163
Merged
got3nks merged 1 commit intoJun 15, 2026
Merged
Conversation
Reported in amule-project#162. The Server Info tab in the Network panel kept displaying messages from the disconnected server because there was no clear-on-disconnect path — the cumulative `server_msg` buffer (monolithic) and the diff-snapshot / on-screen text ctrl (amulegui post-amule-project#120) just kept accumulating. Adds a small ClearServerInfo() on each app variant: - CamuleApp::ClearServerInfo() — clears server_msg. - CamuleRemoteGuiApp::ClearServerInfo() — sends EC_OP_CLEAR_SERVERINFO to amuled and clears m_serverinfo_handler.m_seenSoFar. CamuleDlg::ShowConnectionState tracks the previous ed2k state via a static bool and on a connected -> disconnected transition calls both theApp->ClearServerInfo() (data) and ResetLog(ID_SERVERINFO) (UI). The dialog does the UI clear so the data-side method stays compilable in the daemon build (amuledlg lives on CamuleGuiBase which CamuleApp doesn't inherit).
This was referenced Jun 15, 2026
Closed
got3nks
added a commit
that referenced
this pull request
Jun 15, 2026
CamuleApp::ShowConnectionState clears server_msg when the connected-server pointer changes (was on A -> now on B, or now disconnected) so amuled wipes its buffer before B's welcome can arrive. CamuleDlg::ShowConnectionState only handles the UI side (ResetLog) -- no GUI-side EC clear, which previously raced the new server's welcome message. Drops the ClearServerInfo methods added in #163 -- amuled-side path replaces them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #162.
The Server Info tab in the Network panel kept displaying messages from the disconnected server because there was no clear-on-disconnect path — the cumulative
server_msgbuffer (monolithic) and the diff-snapshot / on-screen text ctrl (amulegui post-#120) just kept accumulating.What this PR does
Adds a small
ClearServerInfo()on each app variant:CamuleApp::ClearServerInfo()— clearsserver_msg.CamuleRemoteGuiApp::ClearServerInfo()— sendsEC_OP_CLEAR_SERVERINFOtoamuledand clearsm_serverinfo_handler.m_seenSoFar.CamuleDlg::ShowConnectionStatetracks the previous ed2k state via a static bool and on a connected → disconnected transition calls boththeApp->ClearServerInfo()(data) andResetLog(ID_SERVERINFO)(UI). Putting the UI clear on the dialog side keeps the data-side method compilable in the daemon build (amuledlglives onCamuleGuiBase, whichCamuleAppdoesn't inherit).Test plan