--- a/commsfwsupport/commselements/serverden/src/sd_workersession.cpp Mon Sep 06 13:49:23 2010 +0100
+++ b/commsfwsupport/commselements/serverden/src/sd_workersession.cpp Mon Sep 13 15:06:46 2010 +0100
@@ -62,6 +62,7 @@
EXPORT_C CSubSessionIx::~CSubSessionIx()
{
+ iLock.Close();
User::Free(iIx);
}
@@ -693,6 +694,14 @@
EXPORT_C void CWorkerSubSession::ConstructL()
{
iSessionProxy = Player().CurrentSessionProxyL();
+ // Try reserving enough space in the transport sender queue so that we don't overflow the queue
+ // when sending messages in bulk, which can happen in cases like closing the session without
+ // closing individual sub-sessions. Protyping reveals that with a high number of number of
+ // sub-sessions, a transport queue length twice the number of active sub-session is a safe bet
+ CCommsTransport* transport = iPlayer->WorkerThread().Transport();
+ TInt numSubsession = iSession->SubSessions().ActiveCount() + 1;
+ const TInt numUndeliveredMessae = numSubsession * 2;
+ transport->PreallocateQueueSpaceL(numUndeliveredMessae);
}
EXPORT_C CWorkerSubSession::~CWorkerSubSession()