Add a short delay before retrying for a MAC address in get_device_id.

This commit is contained in:
Mike Brady
2023-04-06 12:09:43 +01:00
parent 13ac11bfe0
commit 039618302a
+4
View File
@@ -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)