fix: reset _ping_ack_seen on detail view enter and exit

Stale _ping_ack_seen=true from a previous ping attempt could cause an
immediate PING_OK (with wrong RTT) on the next ping if the new ACK entry
hadn't appeared in the table yet. Reset the flag everywhere _ping_state
is set to PING_IDLE.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-05-14 13:55:35 +02:00
parent 10307d3a03
commit 862714982e

View File

@@ -284,8 +284,9 @@ public:
// ── detail view input ────────────────────────────────────────────────────
if (_detail) {
if (c == KEY_CANCEL || c == KEY_CONTEXT_MENU) {
_detail = false;
_ping_state = PING_IDLE;
_detail = false;
_ping_state = PING_IDLE;
_ping_ack_seen = false;
return true;
}
if (c == KEY_ENTER && _ping_state == PING_IDLE) {
@@ -337,8 +338,9 @@ public:
return true;
}
if (c == KEY_ENTER && _count > 0) {
_detail = true;
_ping_state = PING_IDLE;
_detail = true;
_ping_state = PING_IDLE;
_ping_ack_seen = false;
return true;
}
if (c == KEY_LEFT) {