mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-18 20:57:56 +00:00
Use interval parameter correctly even for unlimited pings
This commit is contained in:
parent
28fc1da2d2
commit
0e6a3cd7cc
@ -986,7 +986,7 @@ int app_mdp_ping(const struct cli_parsed *parsed, struct cli_context *context)
|
||||
/* Now look for replies until one second has passed, and print any replies
|
||||
with appropriate information as required */
|
||||
time_ms_t now = gettime_ms();
|
||||
time_ms_t finish = now + (tx_count < icount?interval_ms:timeout_ms);
|
||||
time_ms_t finish = now + ((tx_count < icount || icount==0)?interval_ms:timeout_ms);
|
||||
for (; !servalShutdown && now < finish; now = gettime_ms()) {
|
||||
time_ms_t poll_timeout_ms = finish - gettime_ms();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user