From c098f66870eceac01880f342329dc1cc97b4ab51 Mon Sep 17 00:00:00 2001 From: randomdan Date: Mon, 13 Jan 2014 21:27:26 +0000 Subject: Add missing collocationOptimized fix Log exception on background send fail --- p2pvr/lib/tuner.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 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 g(lock); + backgroundClients.erase(a.get<2>()); + return true; + } catch (...) { Logger()->messagebf(LOG_DEBUG, "%s: Client transmit error", __PRETTY_FUNCTION__); close(a.get<2>()); -- cgit v1.2.3