net: shell: ping: Do not wait in ICMP Echo-Req

Use the net_icmp_send_echo_request_no_wait() when sending
ICMP Echo-Req so that we can avoid the warning message from
system workqueue handler.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This commit is contained in:
Jukka Rissanen 2024-12-18 15:19:07 +02:00 committed by Benjamin Cabé
parent 81c60e7257
commit 3f4b5a6f3b

View file

@ -272,11 +272,11 @@ static void ping_work(struct k_work *work)
params.data = NULL;
params.data_size = ctx->payload_size;
ret = net_icmp_send_echo_request(&ctx->icmp,
ctx->iface,
&ctx->addr,
&params,
ctx);
ret = net_icmp_send_echo_request_no_wait(&ctx->icmp,
ctx->iface,
&ctx->addr,
&params,
ctx);
if (ret != 0) {
PR_WARNING("Failed to send ping, err: %d", ret);
ping_done(ctx);