[Libwebsockets] Avoiding DNS retries?

Felipe Gasper felipe at felipegasper.com
Mon Jun 28 16:19:04 CEST 2021


> On Jun 28, 2021, at 6:04 AM, Andy Green <andy at warmcat.com> wrote:
> 
> On 6/25/21 11:35 AM, Felipe Gasper wrote:
>>> On Jun 25, 2021, at 12:05 AM, andy at warmcat.com wrote:
>>> 
>>> 
>>> 
>>> On June 25, 2021 3:26:15 AM UTC, Felipe Gasper <felipe at felipegasper.com> wrote:
>>>> Hello,
>>>> 
>>>> 	I’ve noticed that LWS retries DNS lookups by default. Can I disable
>>>> this, so that the first lookup hard-fails?
>>> 
>>> 
>>> Can you explain your scenario a bit?
>>> curl http://ajdsdasc.asdsadf
>> curl: (6) Could not resolve host: ajdsdasc.asdsadf
>> ^^ That ends right away, as I’d expect. Likewise ping, traceroute, et al.
>> With my demo LWS app, though, it retries several times, even though the DNS lookup receives an error response every time
> There's a patch on main that makes it call a CLIENT_CONNECTION_ERROR and fail the client connection api call in that case.
> 
> https://libwebsockets.org/git/libwebsockets/commit?id=66afeaa5bc338e1a25d31bb98092fbee3f36a60b

Thank you again!

-F


More information about the Libwebsockets mailing list