dns resolve time out,return Timer Expired,local_close_code return 1006
connect fail, con->get_ec().message() return "Timer Expired", get_local_close_code return 1006. because my url no ipv6 server,dns resolve ipv4+ipv6 time out.
in websocketpp\transport\asio\endpoint.hpp
void async_connect(transport_con_ptr tcon, uri_ptr u, connect_handler cb)
tcp::resolver::query query(host,port);
when i change
tcp::resolver::query query(tcp::v4(),host,port)
it can only dns resolve ipv4,and connect success.
if i can call some api or config to set dns only resolve ipv4 in my code ,instead change code in lib? thanks!
Running into a similar issue here - when the DNS server gives a Refused response, asio/websocketpp somehow interprets this to give up connecting, yet it does have a valid IPv4 address.
Is there anyhow we can influence this tcp::resolver behavior? I couldn't find where it actually gives up on a non-noerr response.