[GB.NET.CURL]

* BUG: HttpClient: Set timeout even in asynchronous mode.
* BUG: FtpClient: Set timeout even in asynchronous mode.


git-svn-id: svn://localhost/gambas/trunk@6429 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
Benoît Minisini 2014-08-26 18:53:39 +00:00
parent 07a4e58a86
commit bbafcf41fc
3 changed files with 5 additions and 13 deletions

View File

@ -32,7 +32,7 @@
#include <curl/curl.h>
#include <curl/easy.h>
//#define DEBUG 1
#define DEBUG 1
#ifndef __CCURL_C

View File

@ -110,12 +110,8 @@ static void ftp_initialize_curl_handle(void *_object)
#endif
}
if (!THIS->async)
{
curl_easy_setopt(THIS_CURL, CURLOPT_NOSIGNAL, 1);
curl_easy_setopt(THIS_CURL, CURLOPT_TIMEOUT, THIS->timeout);
}
curl_easy_setopt(THIS_CURL, CURLOPT_NOSIGNAL, 1);
curl_easy_setopt(THIS_CURL, CURLOPT_TIMEOUT, THIS->timeout);
curl_easy_setopt(THIS_CURL, CURLOPT_VERBOSE, (bool)THIS->debug);
curl_easy_setopt(THIS_CURL, CURLOPT_PRIVATE,(char*)_object);

View File

@ -188,12 +188,8 @@ static void http_initialize_curl_handle(void *_object, GB_ARRAY custom_headers)
THIS_CURL = curl_easy_init();
}
if (!THIS->async)
{
curl_easy_setopt(THIS_CURL, CURLOPT_NOSIGNAL,1);
curl_easy_setopt(THIS_CURL, CURLOPT_TIMEOUT,THIS->timeout);
}
curl_easy_setopt(THIS_CURL, CURLOPT_NOSIGNAL,1);
curl_easy_setopt(THIS_CURL, CURLOPT_TIMEOUT,THIS->timeout);
curl_easy_setopt(THIS_CURL, CURLOPT_VERBOSE, (bool)THIS->debug);
curl_easy_setopt(THIS_CURL, CURLOPT_PRIVATE,(char*)_object);
curl_easy_setopt(THIS_CURL, CURLOPT_USERAGENT, THIS_HTTP->sUserAgent);