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:
parent
ab7937f2bc
commit
198a85b53c
1 changed files with 6 additions and 0 deletions
|
@ -1097,6 +1097,12 @@ lws_async_dns_query(struct lws_context *context, int tsi, const char *name,
|
||||||
goto failed;
|
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? */
|
/* there's an ongoing query we can share the result of? */
|
||||||
|
|
||||||
q = lws_adns_get_query(dns, qtype, 0, name);
|
q = lws_adns_get_query(dns, qtype, 0, name);
|
||||||
|
|
Loading…
Add table
Reference in a new issue