DSU: fix build error when enable DEBUG_DSU_CLIENT (#408)

This commit is contained in:
Zhaohui Shi 2022-10-25 05:14:22 +08:00 committed by GitHub
parent 4561a6929c
commit 643ac57a30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -263,7 +263,7 @@ void DSUControllerProvider::reader_thread()
if (ec)
{
#ifdef DEBUG_DSU_CLIENT
printf(" DSUControllerProvider::ReaderThread: exception %s\n", ex.what());
printf(" DSUControllerProvider::ReaderThread: exception %s\n", ec.what());
#endif
// there's probably no server listening on the given address:port
@ -406,10 +406,10 @@ void DSUControllerProvider::writer_thread()
{
m_socket.send_to(boost::asio::buffer(msg.get(), msg->GetSize()), m_receiver_endpoint);
}
catch (const std::exception&)
catch (const std::exception& ec)
{
#ifdef DEBUG_DSU_CLIENT
printf(" DSUControllerProvider::WriterThread: exception %s\n", ex.what());
printf(" DSUControllerProvider::WriterThread: exception %s\n", ec.what());
#endif
std::this_thread::sleep_for(std::chrono::milliseconds(250));
}