From f41f7b63e856286acc8cfd65167dda2f49b13156 Mon Sep 17 00:00:00 2001 From: Zhaohui Shi Date: Mon, 31 Oct 2022 21:27:35 +0800 Subject: [PATCH] DSUController: fix crash when running on offline mode (#434) --- src/input/api/DSU/DSUControllerProvider.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/input/api/DSU/DSUControllerProvider.cpp b/src/input/api/DSU/DSUControllerProvider.cpp index 89065be6..ab5f406c 100644 --- a/src/input/api/DSU/DSUControllerProvider.cpp +++ b/src/input/api/DSU/DSUControllerProvider.cpp @@ -78,7 +78,8 @@ bool DSUControllerProvider::connect() using namespace boost::asio; ip::udp::resolver resolver(m_io_service); - const ip::udp::resolver::query query(ip::udp::v4(), get_settings().ip, fmt::format("{}", get_settings().port)); + const ip::udp::resolver::query query(ip::udp::v4(), get_settings().ip, fmt::format("{}", get_settings().port), + ip::udp::resolver::query::canonical_name); m_receiver_endpoint = *resolver.resolve(query); if (m_socket.is_open())