curl-library
Re: [ curl-Bugs-917642 ] SSL connect blocks curl_multi_perform
Date: Tue, 16 Mar 2004 23:23:07 +0100 (CET)
On Tue, 16 Mar 2004, SourceForge.net wrote:
> I am using HTTPS post requests to create a secure connection to a server.
> The client (libcurl) side uses the multi interface calling
> curl_multi_perform every 10ms or so from a timer dispatched by the UI
> package (fltk) which blocks the UI during the processing of the timer. I
> have been assuming that curl_multi_perform is essentially a non-blocking
> interface and therefore is ok to call in this way (which it is nearly all of
> the time). However, if the server (apache) shuts down while the client is
> establishing a connection, libcurl's curl_multi_perform can get stuck
> in a select call waiting for openssl to connect.
(I'm replying in a mail since I was just typing in a longish answer in my
browser for the bug tracker when my browser crashed and I got much annoyed!)
Hi Stuart!
You are absolutely right about just about everything here: the multi interface
is designed and meant to be a non-blocking interface. There is a bug in there
that makes a blocking "wait" for SSL connects when in fact it shouldn't.
However, this bug is known and mentioned in the TODO document as a subject to
fix. There are even other places in the code that also wrongly blocks when
they should not.
I would *warmly* welcome qny patches that offer this functionality. I don't
know when I'll be able to take a stab at this myself.
> https://sourceforge.net/tracker/?func=detail&atid=100976&aid=917642&group_id=976
-- Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/ [[ Do not send mails to this email address. They won't reach me. ]]Received on 2004-03-16