Fix: #292 RTT display showing 0 or 1 instead of actual milliseconds

- Convert srtt from seconds to milliseconds before sending in Heartbeat
  (srtt is stored in seconds but Ping field expects milliseconds)
- Add input validation in RttEstimator::update_from_sample to filter
  abnormal RTT values (<=0 or >30000ms)
This commit is contained in:
yuanyuanxiang
2026-01-25 20:56:40 +01:00
parent b4c47ba553
commit 53515820ea
2 changed files with 7 additions and 2 deletions

View File

@@ -1008,7 +1008,7 @@ int AuthKernelManager::SendHeartbeat()
ActivityWindow checker;
auto s = checker.Check();
Heartbeat a(s, m_nNetPing.srtt);
Heartbeat a(s, (int)(m_nNetPing.srtt * 1000)); // srtt是秒转为毫秒
a.HasSoftware = SoftwareCheck(m_settings.DetectSoftware);
iniFile THIS_CFG;