curl-library
Re: issue with quick reconnect
Date: Wed, 19 Aug 2009 08:34:58 +0200 (CEST)
On Wed, 19 Aug 2009, Jogeshwar Karthik Akundi wrote:
>> And why do you think this is a libcurl problem? Isn't it simply some
>> problem with the remote server?
>
> I have been going through the server side logs also (Server also is our
> code, but doesn't use curl). I couldn't detect any error on the server end.
> Server just sees that the socket is closed or not sending data. Also, if the
> server had closed the connection, CURL should return an error other than
> CurlCode = 1 (Unsupported protocol).
Yes, 1 seems totally inappropriate to return in any case. I hope you can run
it with a debugger to see why and where it makes that decision.
>> debugger? strace? printfs()?
>
> Unfortunately, I work on windows, so strace is not an option. the only info
> I could find was through CURL debug logs which I have pasted in the previous
> mail.
Right, but I was more curious on the exact circumstances when it breaks that
then isn't shown in the libcurl output. BTW: There are strace-like tools for
windows, but of course the output won't help me much then...
> I was thinking if may be there could be some kind of a hammer fix which can
> atleast circumvent this issue while I investigate futher. I tried to
> introduce a 2 second delay between disconnect and connect but it still fails
> with the same error (it failed on the 27th attempt to connect).
There might be a fix, but this is not a known flaw so first we/you need to
find the root of the problem and then figure out how to best adress it.
If you don't want to debug this all by yourself, I would say that a good way
is to write up an example code for us that repeats the problem so that you
convince others to join in and help.
-- / daniel.haxx.seReceived on 2009-08-19