From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Thu, 6 Apr 2023 11:09:43 +0000 (+0100) Subject: Add a short delay before retrying for a MAC address in get_device_id. X-Git-Tag: 4.2.1d0~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=039618302a6ee584ad86aced5591bca8f768a0aa;p=thirdparty%2Fshairport-sync.git Add a short delay before retrying for a MAC address in get_device_id. --- 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)