cURL / Mailing Lists / curl-users / Single Mail

curl-users

issue with quick reconnect

From: Jogeshwar Karthik Akundi <ajkarthik_at_gmail.com>
Date: Fri, 14 Aug 2009 15:47:22 +0530

Hi,
The following is the scenario in which curl gives me an error:
1) I Connect to my server from my client program using the easy api of
libcurl (HTTPS, libcurl compiled with openSSL)
2) Close the connection
3) Immediately connect again with a new curl easy handle.

Issue is that the connection goes through fine but the read operation fails.

This works most of the times but sometimes (about one in eight cases) I get
an error when I try to read using curl_easy_recv. it returns curlcode = 1
(unsupported protocol).
I enabled CURL debug logs and this is the error line I get:

*"Failed to get recent socket"*

Sometimes this error is returned immediately on invoking the read operation.
Sometimes the curl_easy_recv is blocked for about one minute before this
error is returned (CURLOPT_TIMEOUT is set to 30 seconds).
While connecting, the connection is claimed to be successful and the Raw
socket is also obtained correctly without issues. But when trying to read,
this issue crops up.

I tried googling for this but couldn't make progress :(
Can somebody point me as to what the error could be?

Environment:
OS: Windows XP SP3
CURL: curl 7.19.2 (i386-pc-win32) libcurl/7.19.2 OpenSSL/0.9.8k
Protocols: http https
Features: Largefile NTLM SSL SSPI

Thanks
Karthik

-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2009-08-14