Abort all connections in progress when device enters disconnected state.
[yandex-traffic] / http_fetcher.cpp
index 2d1d030..543260d 100644 (file)
@@ -39,3 +39,12 @@ void HttpFetcher::requestDone (bool err)
     _buffer.close ();
     _buffer.setBuffer (NULL);
 }
+
+
+void HttpFetcher::reset ()
+{
+    if (!busy ())
+        return;
+
+    _http.abort ();
+}