Bugs item #1330310, was opened at 2005-10-19 01:08
Message generated for change (Comment added) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1330310&group_id=976
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: libcurl
Group: crash
Status: Open
Resolution: None
>Priority: 8
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Daniel Stenberg (bagder)
Summary: crash when using bad socket
Initial Comment:
Hi,
I've just found a bug in libcurl.
when reusing a socket fails on CURLE_SEND_ERROR
it try to close that socket and start a new one as written
in that comment:
/* This was a re-use of a connection and we got a write
error in the
* DO-phase. Then we DISCONNECT this
connection and have another attempt
* to CONNECT and then DO again! The retry
cannot possibly find another
* connection to re-use, since we only keep one
possible connection for
* each. */
however the result = Curl_done(&conn, result); at
Curl_do function returns the same error
and the following if does not create a new socket.
that cause the rest of the program to disconnect an
already disconnected socket and crash.
I've changed the if to f(CURLE_OK == result ||
CURLE_SEND_ERROR == result)
and it looks fine. but I'm not sure it is yours prefered fix.
Thanks and have a great day.
Ofer
----------------------------------------------------------------------
>Comment By: Daniel Stenberg (bagder)
Date: 2005-10-19 23:05
Message:
Logged In: YES
user_id=1110
Are you using FTP when this problem occurs? (trying to
understand how you can get a send error from Curl_done() )
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1330310&group_id=976
Received on 2005-10-19