cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl library's uninitialization is got hang

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 6 Aug 2014 10:52:32 +0200

On Wed, Aug 06, 2014 at 12:24:45PM +0530, shine wrote:
> I am using curl 0.7.24 library and it is got stuck sometimes during

Do you mean version 7.24.0? That versions is already 2½ years old and has had
many bug fixes applied in that time. Have you tried the latest version?

> Un-initialization. Here below i wrote how i am doing curl lib init
> and de-init process:

In what function does it hang?

>
> Init:
> do
> {
> if (CURLE_OK != (res = curl_global_init(CURL_GLOBAL_ALL)))
> {
> iReturnVal = -1;
> break;
> }
> curl = curl_easy_init();
> if (!curl)
> {
> iReturnVal = -1;
> break;
> }
> }while(0);
>
> De-Init:
> if (NULL != curl)
> {
> curl_easy_cleanup(curl);
> curl = NULL;
> }
> curl_global_cleanup();
>
> Some other function i am using are curl_easy_reset, curl_easy_setopt,
> curl_easy_perform.
>
> If this bug is already resolved then please provide me some patch for
> that and if not then if you want any further detail how i am doing
> all curl operation then please let me know.

A minimal complete, executable source code that exhibits the problem would be
useful as there isn't much information here. The particular calls you mention
look fine. But if you still see this problem with curl 7.37.1, first try to
find out where it's hanging using a debugger as that may provide some clues.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-08-06