DSUController: fix crash when running on offline mode (#434)

This commit is contained in:
Zhaohui Shi 2022-10-31 21:27:35 +08:00 committed by GitHub
parent c143950dd1
commit f41f7b63e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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())