When server list received, only start pings if timer not running - #3847
When server list received, only start pings if timer not running#3847softins wants to merge 2 commits into
Conversation
This avoids a double ping on startup due to receiving the reduced server list and the normal server list in quick succession.
|
MY Opus 5 LLM WROTE: Traced this through the call sites and the logic holds up. The The one thing worth checking rather than assuming is whether the That subset turns out to be empty. The same captures show the fix doing what it claims: on mainline the first burst carries 22 ping packets, on this branch 11. No blocker from me. |
Short description of changes
In
CConnectDlg::SetServerList(), test whetherTimerPingis already running before starting it and callingOnTimerPing()This avoids a double ping on startup due to receiving the reduced server list and the normal server list in quick succession. It also appears to fix the longstanding behaviour of the first ping values displayed being wildly inaccurate.
CHANGELOG: Client: remove double ping from Connect Dialog, improving accuracy of initial ping times displayed.
Context: Fixes an issue?
I noticed while working on the TCP support, that when opening the connect dialog or changing directory, it would initially ping every server twice in succession. This turned out to be because of receiving the reduced and full server lists from the directory. They would both result in a call to
OnTimerPing()and starting ofTImerPing. This PR checks whetherTimerPingis already running before doing so, thereby avoiding the double ping.Does this change need documentation? What needs to be documented and how?
No, bugfix only.
Status of this Pull Request
Ready. Would also be worth backporting to 3.12.4
What is missing until this pull request can be merged?
Review
Checklist