datacommsserver/esockserver/test/TE_RConnectionSuite/src/TE_RConnectionDummyNifTestSteps.cpp
changeset 65 41cc8e7ff496
parent 25 e53adc4c49de
--- a/datacommsserver/esockserver/test/TE_RConnectionSuite/src/TE_RConnectionDummyNifTestSteps.cpp	Fri Jun 11 14:52:21 2010 +0300
+++ b/datacommsserver/esockserver/test/TE_RConnectionSuite/src/TE_RConnectionDummyNifTestSteps.cpp	Wed Aug 18 10:59:59 2010 +0300
@@ -142,7 +142,10 @@
 
 void CProgressWatcherTest1b::DoCancel()
 	{
-	iConnection.CancelProgressNotification();
+    if (iConnection.SubSessionHandle() != 0)
+        {
+        iConnection.CancelProgressNotification();
+        }
 	}
 
 void CProgressWatcherTest1b::RunL()
@@ -220,12 +223,11 @@
 		{
 		INFO_PRINTF2(_L("Closing Connection at Stage %d"), iProgressWatcher->Progress()().iStage);
 		}
-
-	Cancel();
 	
+    Cancel();
 	delete iProgressWatcher;
 	iProgressWatcher = NULL;
-	iConnection.Close();
+
 	iSocketServ.Close();
 	}
 
@@ -244,6 +246,7 @@
 
 void CConnectionTest1b::DoCancel()
 	{
+    iConnection.Close();
 	StopProgressObservation();
 	}