Haxx ad

curl's project page on


cURL > Mailing List > Monthly Index > Single Mail

curl-library Mailing List Archives

Re: Double close with SSL

From: Kevin Baughman <>
Date: Sat, 17 Oct 2009 13:07:32 -0700 (PDT)

Hi Daniel,

Yes, it happens in NSS only. I just verified that. I built the source and attached a debugger. I think this fixes the problem:

-bash-4.0# diff -c lib/nssorig.c lib/nss.c
*** lib/nssorig.c Fri Oct 16 20:51:42 2009
--- lib/nss.c Fri Oct 16 21:05:06 2009
*** 896,901 ****
--- 896,902 ----

   if(connssl->handle) {
+ conn->sock[sockindex] = CURL_SOCKET_BAD;
     if(connssl->client_nickname != NULL) {
       connssl->client_nickname = NULL;

Later sclose is called in conn_free if it is not set to CURL_SOCKET_BAD:

  /* close possibly still open sockets */
  if(CURL_SOCKET_BAD != conn->sock[FIRSTSOCKET])

I'm trying this now to see if this solved my issue. It did solve the double close with the simple test using the command line.



From: Daniel Stenberg <>
To: libcurl development <>
Sent: Sat, October 17, 2009 3:42:00 PM
Subject: Re: Double close with SSL

On Thu, 15 Oct 2009, Kevin Baughman wrote:

> curl

I tried valgrind on this with my curl built with OpenSSL and I get no double close... Can you run your version with valgrind to see if the problem isn't within or perhaps related to NSS?

List admin:

List admin:
Received on 2009-10-17

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET