forked from enlightenment/efl
fix ecore_con_url using 100% cpu and just let fd handler do work
this fixes T1251 - @fix
This commit is contained in:
parent
e186f6dbc5
commit
7c00bd5123
|
@ -246,7 +246,6 @@ static Eina_List *_fd_hd_list = NULL;
|
||||||
static int _init_count = 0;
|
static int _init_count = 0;
|
||||||
static Ecore_Timer *_curl_timer = NULL;
|
static Ecore_Timer *_curl_timer = NULL;
|
||||||
static Eina_Bool pipelining = EINA_FALSE;
|
static Eina_Bool pipelining = EINA_FALSE;
|
||||||
static Ecore_Idler *_curl_idler = NULL;
|
|
||||||
|
|
||||||
static Ecore_Con_Curl *_c = NULL;
|
static Ecore_Con_Curl *_c = NULL;
|
||||||
static Eina_Bool _c_fail = EINA_FALSE;
|
static Eina_Bool _c_fail = EINA_FALSE;
|
||||||
|
@ -372,11 +371,6 @@ ecore_con_url_shutdown(void)
|
||||||
ecore_timer_del(_curl_timer);
|
ecore_timer_del(_curl_timer);
|
||||||
_curl_timer = NULL;
|
_curl_timer = NULL;
|
||||||
}
|
}
|
||||||
if (_curl_idler)
|
|
||||||
{
|
|
||||||
ecore_idler_del(_curl_idler);
|
|
||||||
_curl_idler = NULL;
|
|
||||||
}
|
|
||||||
EINA_LIST_FREE(_url_con_list, url_con)
|
EINA_LIST_FREE(_url_con_list, url_con)
|
||||||
ecore_con_url_free(url_con);
|
ecore_con_url_free(url_con);
|
||||||
EINA_LIST_FREE(_fd_hd_list, fd_handler)
|
EINA_LIST_FREE(_fd_hd_list, fd_handler)
|
||||||
|
@ -1554,7 +1548,7 @@ _ecore_con_url_fd_handler(void *data EINA_UNUSED, Ecore_Fd_Handler *fd_handler E
|
||||||
_c->curl_multi_timeout(_c->_curlm, &ms);
|
_c->curl_multi_timeout(_c->_curlm, &ms);
|
||||||
if ((ms >= CURL_MIN_TIMEOUT) || (ms <= 0)) ms = CURL_MIN_TIMEOUT;
|
if ((ms >= CURL_MIN_TIMEOUT) || (ms <= 0)) ms = CURL_MIN_TIMEOUT;
|
||||||
ecore_timer_interval_set(_curl_timer, (double)ms / 1000.0);
|
ecore_timer_interval_set(_curl_timer, (double)ms / 1000.0);
|
||||||
if (!_curl_idler) _curl_idler = ecore_idler_add(_ecore_con_url_timer, NULL);
|
_ecore_con_url_timer(NULL);
|
||||||
return ECORE_CALLBACK_CANCEL;
|
return ECORE_CALLBACK_CANCEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1622,11 +1616,6 @@ _ecore_con_url_timer(void *data EINA_UNUSED)
|
||||||
ERR("curl_multi_perform() failed: %s", _c->curl_multi_strerror(ret));
|
ERR("curl_multi_perform() failed: %s", _c->curl_multi_strerror(ret));
|
||||||
_ecore_con_url_curl_clear();
|
_ecore_con_url_curl_clear();
|
||||||
ecore_timer_freeze(_curl_timer);
|
ecore_timer_freeze(_curl_timer);
|
||||||
if (_curl_idler)
|
|
||||||
{
|
|
||||||
ecore_idler_del(_curl_idler);
|
|
||||||
_curl_idler = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (still_running)
|
if (still_running)
|
||||||
{
|
{
|
||||||
|
@ -1645,11 +1634,6 @@ _ecore_con_url_timer(void *data EINA_UNUSED)
|
||||||
_ecore_con_url_info_read();
|
_ecore_con_url_info_read();
|
||||||
_ecore_con_url_curl_clear();
|
_ecore_con_url_curl_clear();
|
||||||
ecore_timer_freeze(_curl_timer);
|
ecore_timer_freeze(_curl_timer);
|
||||||
if (_curl_idler)
|
|
||||||
{
|
|
||||||
ecore_idler_del(_curl_idler);
|
|
||||||
_curl_idler = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return ECORE_CALLBACK_RENEW;
|
return ECORE_CALLBACK_RENEW;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue