1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-30 00:00:16 +01:00

async dns: handle late udp creation

We may have to retry the UDP socket creation to the DNS servers until
network is up.
This commit is contained in:
Andy Green 2022-04-24 06:47:29 +01:00
parent ab7937f2bc
commit 198a85b53c

View file

@ -1097,6 +1097,12 @@ lws_async_dns_query(struct lws_context *context, int tsi, const char *name,
goto failed;
}
/* make sure we have the remote server UDP enabled, it's cheap if we
* already do. This is for the case we came up before the network and
* couldn't succeed to open the socket / wsi initially */
lws_async_dns_create_server_wsi(context);
/* there's an ongoing query we can share the result of? */
q = lws_adns_get_query(dns, qtype, 0, name);