diff options
| author | ymj0440 <[email protected]> | 2026-10-12 20:46:51 +0800 |
|---|---|---|
| committer | Rbb666 <[email protected]> | 2026-10-15 09:10:50 +0800 |
| commit | 20881ec5710f0aa78cc6d483c5c6d0f09d6105b8 (patch) | |
| tree | 0d2ae91e8c3900ac19ea574752098baf161478a3 /components/cplusplus/cpp11 | |
| parent | 8acbb5df8ec50d9c76f7cb407cc7970e7eecdb28 (diff) | |
fix(netdev): correct ping delay logic for last packet and avoid rt_thread_delay(0)
The 'index == times' condition in the delay_tick calculation is never true,
so the delay was still applied after the last ping, contrary to the comment.
Skip the delay on the final ping by checking 'index != times - 1'.
Also only call rt_thread_delay() when delay_tick > 0, since passing 0
returns -RT_EINVAL.
Diffstat (limited to 'components/cplusplus/cpp11')
0 files changed, 0 insertions, 0 deletions
