Commit 69e109e
committed
fix(ping): always set transmitted count regardless of ping success
When all pings fail (timeout -> Icmp.PingResult.Failed), rttList stays
empty and stats.transmitted was never assigned, leaving it at 0.
Move stats.transmitted = count before the rttList.isNotEmpty() check so
it always reflects the number of attempted pings, matching the expected
semantics of "packets transmitted".
This unblocks HandshakeRestartHandler.awaitPingFailures() (introduced in
#1182) which requires transmitted > 0 to distinguish a real failure from
pings not routed through the tunnel.1 parent b39a60d commit 69e109e
1 file changed
Lines changed: 1 addition & 1 deletion
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
65 | 66 | | |
66 | | - | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
0 commit comments