curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support. 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 Daniel himself.

Re: Weird behavior when using DoH with the multi interface

From: Daniel Stenberg via curl-library <curl-library_at_lists.haxx.se>
Date: Tue, 4 Jun 2024 16:59:54 +0200 (CEST)

On Tue, 4 Jun 2024, Daniel Stenberg via curl-library wrote:

> Interesting case. I think we should make DoH requests exempt from that
> check/restriciton, as otherwise you can end up in this kind of catch-22
> situation.

kartatz, how about a patch like this?

--- a/lib/url.c
+++ b/lib/url.c
_at__at_ -3661,12 +3661,16 _at__at_ static CURLcode create_conn(struct Curl_easy *data,
        /* The cache is full. Let's see if we can kill a connection. */
        conn_candidate = Curl_conncache_extract_oldest(data);
        if(conn_candidate)
          Curl_disconnect(data, conn_candidate, FALSE);
        else {
- infof(data, "No connections available in cache");
- connections_available = FALSE;
+ if(data->set.dohfor)
+ infof(data, "Allowing DoH to override max connection limit");
+ else {
+ infof(data, "No connections available in cache");
+ connections_available = FALSE;
+ }
        }
      }

      if(!connections_available) {
        infof(data, "No connections available.");

-- 
  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://curl.se/support.html
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2024-06-04