I use websocketpp to implement websocket client on mobile , I observe one problem that when async_resolve timeout (default 5 seconds),it try to cancel the DNS process(resolver->cancel()), at this moment , if main thread try to disconnect/close connection and deconstruct the endpoint object will got struct. because the async_resolve working in io service will be timeout in 30 seconds.
I have two confusion , please enlighten me, thanks
1. how to really cancel the async_resolve when DNS resolve timeout?
2. how to avoid blocking the main threading in this case?