util: add io_service warning to dns::asyncResolve
refs #2534
Change-Id: I4f3f8303caadbf9dd885e21109a7b09fd25dd802
diff --git a/src/util/dns.hpp b/src/util/dns.hpp
index ed15dd3..525cd1b 100644
--- a/src/util/dns.hpp
+++ b/src/util/dns.hpp
@@ -81,6 +81,11 @@
* - resolver::AnyAddress()
* - resolver::Ipv4Address()
* - resolver::Ipv6Address()
+ *
+ * \warning Even after the DNS resolution has timed out, it's possible that
+ * \p ioService keeps running and \p onSuccess is invoked at a later time.
+ * This could cause segmentation fault if \p onSuccess is deallocated.
+ * To stop the io_service, explicitly invoke \p ioService.stop().
*/
void
asyncResolve(const std::string& host,