aes67-daemon hangs on inaccessible rtsp url for sdp
I tried to add a local sink with the SPD source: "rtsp://test/api/source/sdp/2"
This seem to have gotten the aes67 daemon to get stuck waiting for it.
It took about 4 minutes before it timed out that socket connection and the daemon started answering to http requests again.
A quick test like:
--- rtsp_client.cpp
+++ rtsp_client.cpp
@@ -133,6 +133,7 @@
try {
BOOST_LOG_TRIVIAL(debug) << "rtsp_client:: connecting to "
<< "rtsp://" << address << ":" << port << path;
+ s.expires_after(std::chrono::seconds(5));
s.connect(address, port.length() ? port : dft_port);
if (!s || s.error()) {
BOOST_LOG_TRIVIAL(warning)
Solves that specific issue but i'm guessing it breaks the wait_for_updates functionality, and possibly other things to.
What is the suggested way of solving this in a better way?
I think your solution is good and also a timeout in the range of 5 to 10 seconds looks reasonable considering the RTSP server is on the same LAN. In the end it will be handled as if we cannot connect.
The only thing is that expires_after exists only starting from BOOST_VERSION >= 106600
A solution could be:
#if BOOST_VERSION < 106600
s.expires_from_now(boost::posix_time::seconds(5));
#else
s.expires_after(boost::asio::chrono::seconds(5));
#endif
if this works for you I can proceed with the merge into master. Please let me know.
Works just fine for me. All ok for me to write up and commit.