]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: ensure connect timeout is set to 3 seconds only in the case of notifications 61942/head
authorAdarsh <dev.9401adarsh@gmail.com>
Wed, 26 Feb 2025 19:12:23 +0000 (19:12 +0000)
committerAdarsh <dev.9401adarsh@gmail.com>
Wed, 26 Feb 2025 19:12:23 +0000 (19:12 +0000)
Signed-off-by: Adarsh <dev.9401adarsh@gmail.com>
src/rgw/driver/rados/rgw_pubsub_push.cc
src/rgw/rgw_http_client.h

index 3041e3a932cf6b33585988cdc5e1b501d1021414..f3baeeb0aa89bb720cdc3a8cc26d3fb392ad3af2 100644 (file)
@@ -101,6 +101,8 @@ public:
     }
     bufferlist read_bl;
     RGWPostHTTPData request(cct, "POST", endpoint, &read_bl, verify_ssl);
+    //default to 3 seconds for wrong url hits - if wrong endpoint configured
+    request.set_req_connect_timeout(3);
     const auto post_data = json_format_pubsub_event(event);
     if (cloudevents) {
       // following: https://github.com/cloudevents/spec/blob/v1.0.1/http-protocol-binding.md
index 01762cf7ea5ad256eed1e08269fe0ab2b9b34f43..9db6007581af3ea5f4e88953ffffd3f8c824ac0f 100644 (file)
@@ -64,7 +64,7 @@ protected:
   param_vec_t headers;
 
   long  req_timeout{0L};
-  long  req_connect_timeout{3L};
+  long  req_connect_timeout{0L};
 
   void init();