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.

Option to close all active connections

From: Shikha Sharma via curl-library <curl-library_at_lists.haxx.se>
Date: Mon, 25 Sep 2023 14:40:04 +0200

Hello Everyone,

I am using libcurl-8.1.2 to send HTTP/2 requests to a remote server. I
have run into a scenario where the HTTP server temporarily stops responding.

The requests to the server eventually timeout. After the server starts
responding again, we have observed that

  * A  request sent with option CONNECT_ONLY is successful immediately
    after the server starts responding( Probably uses a new connection)

  * Request if sent with CURLOPT_FRESH_CONNECT, succeeds immediately
    after the server starts responding
  * Request if sent with CURLOPT_FORBID_REUSE also succeeds immediately
    after the server starts responding
  * However, request if sent without above flags tries to use old
    connection and still timeouts. The requests timeout till it sends
    back error 55.
  * Further requests then create a new connection and are successful.

My question: Is there a way to force drop all existing connections at
once? With CURLOPT_FORBID_REUSE the next request might reuse another
open connection which is something we do not want.


Thanks,

Shikha


-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2023-09-25