Add wait for MDNS hostname to be set

This commit is contained in:
Scott Shawcroft 2022-07-15 13:48:19 -07:00
parent e9dd254127
commit 6e7fdcc24b
No known key found for this signature in database
GPG Key ID: 0DFD512649C052DA
2 changed files with 5 additions and 1 deletions

View File

@ -90,6 +90,10 @@ const char *common_hal_mdns_server_get_hostname(mdns_server_obj_t *self) {
void common_hal_mdns_server_set_hostname(mdns_server_obj_t *self, const char *hostname) {
mdns_hostname_set(hostname);
// Wait for the mdns task to set the new hostname.
while (!mdns_hostname_exists(hostname)) {
RUN_BACKGROUND_TASKS;
}
self->hostname = hostname;
}

@ -1 +1 @@
Subproject commit 171e5af9c5b9b126c5f81f217c7b1ff931d54863
Subproject commit 0180c0cb80f052919badc15df164e8edde6344ad