From 039618302a6ee584ad86aced5591bca8f768a0aa Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Thu, 6 Apr 2023 12:09:43 +0100 Subject: [PATCH] Add a short delay before retrying for a MAC address in get_device_id. --- common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common.c b/common.c index 2fb5003a..3630ea36 100644 --- a/common.c +++ b/common.c @@ -1989,6 +1989,10 @@ int get_device_id(uint8_t *id, int int_length) { } freeifaddrs(ifaddr); } + // wait a little time if we haven't got a response + if (response != 0) { + usleep(100000); + } time_to_wait = wait_until - get_absolute_time_in_ns(); } while ((response != 0) && (time_to_wait > 0)); if (response != 0)