2008-01-10 Luca Bruno <lethalman88@gmail.com>
[WebKit-https.git] / WebCore / platform / network / curl / ResourceHandleManager.cpp
index 456c6dbc3f4bda3b52f973df51d4cce0fbe6f388..39525e0166112093a8228e3de192dd9a78661c54 100644 (file)
@@ -515,11 +515,10 @@ void ResourceHandleManager::cancel(ResourceHandle* job)
     if (removeScheduledJob(job))
         return;
 
-    if (m_downloadTimer.isActive()) {
-        ResourceHandleInternal* d = job->getInternal();
-        d->m_cancelled = true;
-    } else
-        removeFromCurl(job);
+    ResourceHandleInternal* d = job->getInternal();
+    d->m_cancelled = true;
+    if (!m_downloadTimer.isActive())
+        m_downloadTimer.startOneShot(pollTimeSeconds);
 }
 
 } // namespace WebCore