summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2014-01-13 21:27:26 +0000
committerrandomdan <randomdan@localhost>2014-01-13 21:27:26 +0000
commitc098f66870eceac01880f342329dc1cc97b4ab51 (patch)
treef250a2bd5a41e1d0ef91317a6daf398cabab0da9
parentRemove junk for estimating device usage (diff)
downloadp2pvr-c098f66870eceac01880f342329dc1cc97b4ab51.tar.bz2
p2pvr-c098f66870eceac01880f342329dc1cc97b4ab51.tar.xz
p2pvr-c098f66870eceac01880f342329dc1cc97b4ab51.zip
Add missing collocationOptimized fix
Log exception on background send fail
-rw-r--r--p2pvr/lib/tuner.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/p2pvr/lib/tuner.cpp b/p2pvr/lib/tuner.cpp
index f4263ee..bb19a3c 100644
--- a/p2pvr/lib/tuner.cpp
+++ b/p2pvr/lib/tuner.cpp
@@ -264,7 +264,7 @@ Tuner::StartSendingSection(int pid, const P2PVR::RawDataClientPrx & client, cons
std::lock_guard<std::mutex> g(lock);
int demux = backgroundClients.insert(BackgroundClients::value_type(OpenDemux(),
- BackgroundClient(client, &Tuner::IsValidSection))).first->first;
+ BackgroundClient(client->ice_collocationOptimized(false), &Tuner::IsValidSection))).first->first;
RequestPID(pid, demux);
startSenderThread();
return demux;
@@ -412,6 +412,13 @@ Tuner::senderThread()
}
return false;
}
+ catch (const std::exception & ex) {
+ Logger()->messagebf(LOG_DEBUG, "%s: Client transmit error (%s)", __PRETTY_FUNCTION__, ex.what());
+ close(a.get<2>());
+ std::lock_guard<std::mutex> g(lock);
+ backgroundClients.erase(a.get<2>());
+ return true;
+ }
catch (...) {
Logger()->messagebf(LOG_DEBUG, "%s: Client transmit error", __PRETTY_FUNCTION__);
close(a.get<2>());