Opened 7 years ago

#11964 new Bugs

asio async_resolve cannot be cancelled

Reported by: sven_nilsson@… Owned by: chris_kohlhoff
Milestone: To Be Determined Component: asio
Version: Boost 1.59.0 Severity: Problem
Keywords: asio asynchronous DNS resolve Cc:

Description

The asio async_resolve (both the udp and tcp resolver) is incorrectly implemented (on win32) as a synchronous resolve performed in a thread.

This has the unfortunate effect that, when the DNS server is not responding, the application will hang for ~20 seconds. The DNS operation is ongoing in the io_service, and thus the io_service destructor must wait for the thread to finish. I tried several methods in an effort to cancel it, but none worked.

Since the average user has approximately 5 seconds of patience with a non-responding application before killing it with task manager, I really think this needs to be fixed.

Change History (0)

Note: See TracTickets for help on using tickets.