Added RTSP client connection timeout of 5 secs. See issue #91
This commit is contained in:
parent
3d7c8761ee
commit
acb1e55d08
@ -35,7 +35,7 @@ namespace po = boost::program_options;
|
||||
namespace postyle = boost::program_options::command_line_style;
|
||||
namespace logging = boost::log;
|
||||
|
||||
static std::string version("bondagit-1.5.1");
|
||||
static std::string version("bondagit-1.5.2");
|
||||
static std::atomic<bool> terminate = false;
|
||||
|
||||
void termination_handler(int signum) {
|
||||
|
@ -133,6 +133,11 @@ std::pair<bool, RtspSource> RtspClient::process(RtspClient::Observer callback,
|
||||
try {
|
||||
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));
|
||||
#else
|
||||
s.expires_after(boost::asio::chrono::seconds(1));
|
||||
#endif
|
||||
s.connect(address, port.length() ? port : dft_port);
|
||||
if (!s || s.error()) {
|
||||
BOOST_LOG_TRIVIAL(warning)
|
||||
|
Loading…
x
Reference in New Issue
Block a user