cURL / Mailing Lists / curl-library / Single Mail


Re: multi_socket hanging when adding handles

From: Daniel Stenberg <>
Date: Tue, 1 May 2007 19:00:50 +0200 (CEST)

On Tue, 1 May 2007, Michael Wallner wrote:

>> I added a little debug output in the init() function when a new handle is
>> added, and I only see the new ones at the start! When handles are done and
>> "R:" is shown, init() is not called again (at line 153) so there are no new
>> handles/transfers added!?
> They're added for me

Yes for me too, I must've been blind there for a while. Sorry for the false

However, I find that you do strange things in sock_cb(). That function seems
to assume that you only get called once for each socket with a particular
state, while in reality libcurl will update the "action state" for the same
socket multiple times so you add events for the same socket many times and the
curl_multi_assign will overrwite the same hash entry to point to the most
recent event struct.

  Commercial curl and libcurl Technical Support:
Received on 2007-05-01