openziti / ziti-tunnel-sdk-c

Apache License 2.0
43 stars 16 forks source link

dns queries for hostnames in hosted service addresses can block the uv loop #753

Closed scareything closed 10 months ago

scareything commented 10 months ago

When a connection is made to a hosted service, hostnames in the address[es] field of the service configuration are looked up synchronously on the uv loop. This means that packet reading /writing from the tun, other libuv socket activity, and really anything else that the tsdk would otherwise do will be blocked for the duration of the dns lookup.

libuv provides an async DNS query that should be used for hosted server address lookups.