From 429948bc6d558977b7d526e9f2e2a0d477a4c4f5 Mon Sep 17 00:00:00 2001 From: Andrea Bondavalli Date: Sat, 14 Jan 2023 12:00:38 +0100 Subject: [PATCH] Fix to #106 daemon browser doesn't receive mDNS/RTSP updates of a remote source --- daemon/rtsp_client.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/daemon/rtsp_client.cpp b/daemon/rtsp_client.cpp index ae323fb..e1dea27 100644 --- a/daemon/rtsp_client.cpp +++ b/daemon/rtsp_client.cpp @@ -134,9 +134,9 @@ std::pair RtspClient::process(RtspClient::Observer callback, BOOST_LOG_TRIVIAL(debug) << "rtsp_client:: connecting to " << "rtsp://" << address << ":" << port << path; #if BOOST_VERSION < 106600 - s.expires_from_now(boost::posix_time::seconds(1)); + s.expires_from_now(boost::posix_time::seconds(5)); #else - s.expires_after(boost::asio::chrono::seconds(1)); + s.expires_after(boost::asio::chrono::seconds(5)); #endif s.connect(address, port.length() ? port : dft_port); if (!s || s.error()) { @@ -233,6 +233,11 @@ std::pair RtspClient::process(RtspClient::Observer callback, } if (wait_for_updates) { +#if BOOST_VERSION < 106600 + s.expires_from_now(boost::posix_time::hours(24 * 365 * 10)); +#else + s.expires_after(boost::asio::chrono::hours(24 * 365 * 10)); +#endif /* we start waiting for updates */ do { std::getline(s, request);