ecore_con: Tunning for poor network
authorTae-Hwan Kim <the81.kim@samsung.com>
Sat, 29 Oct 2011 07:38:36 +0000 (16:38 +0900)
committerTae-Hwan Kim <the81.kim@samsung.com>
Sat, 29 Oct 2011 07:38:36 +0000 (16:38 +0900)
1. Increase curl max connections to decrease TCP port
2. Remove progress callback when ecore_con is removed

src/lib/ecore_con/ecore_con_url.c

index 4bf28d6..40e76fa 100644 (file)
@@ -277,6 +277,7 @@ ecore_con_url_new(const char *url)
     * FIXME: Check that these timeouts are sensible defaults
     * FIXME: Provide a means to change these timeouts
     */
+   curl_easy_setopt(url_con->curl_easy, CURLOPT_MAXCONNECTS, 100);
    curl_easy_setopt(url_con->curl_easy, CURLOPT_CONNECTTIMEOUT, 30);
    curl_easy_setopt(url_con->curl_easy, CURLOPT_FOLLOWLOCATION, 1);
 
@@ -354,6 +355,7 @@ ecore_con_url_free(Ecore_Con_Url *url_con)
      {
         // FIXME: For an unknown reason, progress continue to arrive after destruction
         // this prevent any further call to the callback.
+        curl_easy_setopt(url_con->curl_easy, CURLOPT_NOPROGRESS, EINA_TRUE);
         curl_easy_setopt(url_con->curl_easy, CURLOPT_PROGRESSFUNCTION, NULL);
 
         if (url_con->active)