]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Add a short delay before retrying for a MAC address in get_device_id.
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Thu, 6 Apr 2023 11:09:43 +0000 (12:09 +0100)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Thu, 6 Apr 2023 11:09:43 +0000 (12:09 +0100)
common.c

index 2fb5003a4082dd167f394c44a3207c188c72ebfe..3630ea367e37e9485e9962b42544330279108e1e 100644 (file)
--- 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)