Skip to content

Commit 0a4be81

Browse files
committed
rgw: ensure connect timeout is set to 3 seconds only in the case of notifications
Signed-off-by: Adarsh <[email protected]>
1 parent 520d326 commit 0a4be81

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/rgw/driver/rados/rgw_pubsub_push.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ class RGWPubSubHTTPEndpoint : public RGWPubSubEndpoint {
101101
}
102102
bufferlist read_bl;
103103
RGWPostHTTPData request(cct, "POST", endpoint, &read_bl, verify_ssl);
104+
//default to 3 seconds for wrong url hits - if wrong endpoint configured
105+
request.set_req_connect_timeout(3);
104106
const auto post_data = json_format_pubsub_event(event);
105107
if (cloudevents) {
106108
// following: https://github.com/cloudevents/spec/blob/v1.0.1/http-protocol-binding.md

src/rgw/rgw_http_client.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class RGWHTTPClient : public RGWIOProvider,
6464
param_vec_t headers;
6565

6666
long req_timeout{0L};
67-
long req_connect_timeout{3L};
67+
long req_connect_timeout{0L};
6868

6969
void init();
7070

0 commit comments

Comments
 (0)