From 87779b0ec8386397caa212fc0d8a8bbba5a8485f Mon Sep 17 00:00:00 2001 From: loki Date: Mon, 16 Mar 2020 19:15:50 +0100 Subject: [PATCH] Additional debug messages --- sunshine/config.cpp | 2 +- sunshine/stream.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sunshine/config.cpp b/sunshine/config.cpp index 44230c4a..46cad8f7 100644 --- a/sunshine/config.cpp +++ b/sunshine/config.cpp @@ -188,7 +188,7 @@ void parse_file(const char *file) { int_between_f(vars, "ping_timeout", to, { -1, std::numeric_limits::max() }); - if(to == -1) { + if(to != -1) { stream.ping_timeout = std::chrono::milliseconds(to); } diff --git a/sunshine/stream.cpp b/sunshine/stream.cpp index 6573c22e..c10a38d2 100644 --- a/sunshine/stream.cpp +++ b/sunshine/stream.cpp @@ -776,7 +776,8 @@ int recv_ping(decltype(broadcast)::ptr_t ref, socket_e type, asio::ip::address & TUPLE_2D_REF(port, msg, *msg_opt); if(msg != ping) { - BOOST_LOG(error) << "First message is not a PING"sv; + BOOST_LOG(error) << "First message is not a PING"; + BOOST_LOG(debug) << "Received from "sv << addr << ':' << port << " ["sv << util::hex_vec(msg) << ']'; return -1; }