Msrp/MsrpServer/src/TStates.cpp
branchMSRP_FrameWork
changeset 60 7634585a4347
parent 58 cdb720e67852
--- a/Msrp/MsrpServer/src/TStates.cpp	Fri Nov 26 12:09:49 2010 +0200
+++ b/Msrp/MsrpServer/src/TStates.cpp	Thu Dec 02 15:23:48 2010 +0200
@@ -250,6 +250,7 @@
             }
         else
             {
+            MSRPLOG("TStateBase::handleClientListnerCancelL completing incoming listener"  );
             if( aContext->iIncommingMessageListner.Check() )
                 {
                 aContext->iIncommingMessageListner.Complete( KErrNone );
@@ -302,9 +303,14 @@
     
     switch(iConnectionEvent)
         {
-        case -1: // Error Scenario         
+        case -1: // Error Scenario    
+            {
+            // empty queue
+            MSRPLOG("TStateBase::handleConnectionStateChangedL, emptying queue " ); 
+            while ( aContext->iCurrentlyReceivingMsgQ.DeQueue() );
             state = handleConnectionErrorsL(aContext);
             break;
+            }
         
         case 1:
         case 2: