I created a patch to skip the retry in the Curl_retry_request function if the CURLOPT_DISABLE_RETRIES flag is set. For my issue it seems to work, but someone else may know this code better and if it is safe or not.
Thanks, Kevin ________________________________ From: Kevin Baughman <[email protected]> To: Curl Library <[email protected]> Sent: Wed, December 16, 2009 2:28:26 PM Subject: Curl_retry_request I have an application that is occasionally seeing this debug message: * SSL read: errno -5961 * Connection died, retrying a fresh connect * Closing connection #1 I noticed in the function Curl_retry_request() there seems to be no way to disable this behavior. Is there any kind of option that will disable ever retrying the request under these circumstances? if((data->req.bytecount + data->req.headerbytecount == 0) && conn->bits.reuse && !data->set.opt_no_body) { /* We got no data, we attempted to re-use a connection and yet we want a "body". This might happen if the connection was left alive when we were done using it before, but that was closed when we wanted to read from it again. Bad luck. Retry the same request on a fresh connect! */ infof(conn->data, "Connection died, retrying a fresh connect\n"); *url = strdup(conn->data->change.url); conn->bits.close = TRUE; /* close this connection */ conn->bits.retry = TRUE; /* mark this as a connection we're about to retry. Marking it this way should prevent i.e HTTP transfers to return error just because nothing has been transfered! */ retry = TRUE; } I can add a user defined option for this, but wanted to make sure I was correct in saying there is no way to disable this. Thanks, Kevin
curl-7.19.6-retry.patch
Description: Binary data
------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
