{
if (which)
{
+ logger->log("Command", Log::NOTICE, "Doing connection lost dialog");
connLost = new VInfo();
connLost->setSize(360, 200);
connLost->createBuffer();
if (*i == edr) break; // found
}
- if (i == receivers.end()) abort(); // should never happen
+ if (i == receivers.end()) return; // Not in the list. Already unregistered? Perhaps vdr::connectionDied already removed this streamclient
+ // FIXME, this should probably be done another way. A call to edUnregister with an object that may or may not be in the list? Not good.
if (!edr->callinprogress)
{
if (!tcp->isConnected()) { connectionDied(); return; } // return to stop this thread
- timeoutCount = 0; // disable it for now
+ timeoutCount = 0; // disable it for now
if (timeoutCount >= 10) //20s
{
if (lastKAsent == 0)
{
+ logger->log("VDR", Log::DEBUG, "Sending KA packet");
if (!sendKA(timeNow)) { connectionDied(); return; }
lastKAsent = timeNow;
continue;
{
lastKAsent = 0;
timeoutCount = 0;
+ logger->log("VDR", Log::ERR, "Rxd correct KA reply");
}
}
else
logger->log("VDR", Log::ERR, "Timeouts: no waiting stream receiver found for streamid %lu !!!", vdrpr->streamID);
delete vresp;
}
- edLock();
+ edLock();
+
+ for(EDRL::iterator i = receivers.begin(); i != receivers.end(); i++)
+ if ((VDR_PacketReceiver*)*i == vdrpr) { receivers.erase(i); break; }
}
}
edUnlock();
if (!connected)
{
+ logger->log("VDR", Log::DEBUG, "RR when !connected");
VDR_ResponsePacket* vresp = new VDR_ResponsePacket();
return vresp; // "no-response" return
}