curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Curl multi socket function receiving a new socket fd before POLL REMOVE on another

From: Andrei Georgescu via curl-library <>
Date: Thu, 22 Jun 2023 23:30:38 +0000


I assumed that, in curl multi (driven by curl_multi_socket_action) the socket fds are sequentially used, i.e. only one at the time, during transfer.
A new socket fd is received, by the socket function of the multi, only after the previous one has been CURL_POLL_REMOVE by that same socket function.

In my tests, I've received a socket fd out of the blue while I had another fd in my easy's CURLOPT_PRIVATE payload, trigerring an assert. So clearly my mental model is wrong.

Can a multi driven easy trasfer have multiple sockets involved at the same time ?


Received on 2023-06-23