webservices/wshttpchanneltransportplugin/src/senhttpsyncrequester.cpp
changeset 23 a1df79fa35b4
parent 1 272b002df977
--- a/webservices/wshttpchanneltransportplugin/src/senhttpsyncrequester.cpp	Fri Apr 16 16:07:50 2010 +0300
+++ b/webservices/wshttpchanneltransportplugin/src/senhttpsyncrequester.cpp	Fri Jun 11 14:42:58 2010 +0300
@@ -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();
         }