Is there any option to forbid reusing a connection for multiplexed transfers without destroying the whole connection pool along with a multi-handle? This may be very useful when some multiplexed connection to a certain host became slow and needs restarting.
Obviously, this can be done by recreating a multi-handle which will destroy the whole connection pool, but it can't be done if the multi is performing some transfers. Ideally, the CURLOPT_FORBID_REUSE in the multiplexing case should mark the multiplexed connection as "expired", and when the last ongoing multiplexed transfer is completed, the connection pool should close it. Otherwise, it will be very difficult for clients to restart multiplexed connections once they become slow. Thanks, Dmitry Karpov -----Original Message----- From: curl-library <[email protected]> On Behalf Of Daniel Stenberg via curl-library Sent: Saturday, September 5, 2026 3:12 AM To: libcurl hacking <[email protected]> Cc: Daniel Stenberg <[email protected]> Subject: [EXTERNAL] CURLOPT_FORBID_REUSE when multiplexing Hey all. For decades libcurl has offered the CURLOPT_FORBID_REUSE option. When each transfer uses a connection exclusively, it is easy to say and understand that this option marks this as the last transfer on the connection. It cannot be reused again for any further transfers. When used for a transfer that is multiplexed together with other transfers over the same connection, this option's meaning and functionality is unclear. I propose we start by explicitly documenting the fact that this option has no effect on multiplexed transfers to avoid surprising users. See https://github.com/curl/curl/pull/22833 Thoughts? -- / daniel.haxx.se || https://rock-solid.curl.dev -- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.html -- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.html
