webservices/wshttpchanneltransportplugin/src/senhttpsyncrequester.cpp
branchRCL_3
changeset 9 6abf3d6055cd
parent 1 272b002df977
--- a/webservices/wshttpchanneltransportplugin/src/senhttpsyncrequester.cpp	Fri Feb 19 23:55:35 2010 +0200
+++ b/webservices/wshttpchanneltransportplugin/src/senhttpsyncrequester.cpp	Mon Mar 15 12:44:52 2010 +0200
@@ -90,7 +90,7 @@
     {
     delete iContentType;
     delete iContent;
-    if (!isStopped)
+    if (!isStopped && iSchedulerWait.IsStarted())
         {
         iSchedulerWait.AsyncStop();
         }
@@ -104,7 +104,10 @@
     if (!isStopped)
         {
         iStatusCode = KErrTimedOut;
-        iSchedulerWait.AsyncStop();
+	    if (iSchedulerWait.IsStarted())
+	        {
+	        iSchedulerWait.AsyncStop();
+	        }
         }
     isStopped = ETrue;
     }
@@ -112,8 +115,11 @@
     {
     if (!isStopped)
         {
-        iStatusCode = aError;
-        iSchedulerWait.AsyncStop();
+    	iStatusCode = aError;
+	    if (iSchedulerWait.IsStarted())
+	        {
+	        iSchedulerWait.AsyncStop();
+	        }
         }
     isStopped = ETrue;
     return aError;
@@ -182,7 +188,7 @@
     {
     iContent = apContent; // transfers ownership of content into _this_ class
     iContentType = ((HBufC8*)aContentType)->AllocL();
-    if (!isStopped)
+    if (!isStopped && iSchedulerWait.IsStarted())
         {
         iSchedulerWait.AsyncStop();
         }