File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
appsec/src/helper/network Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -97,13 +97,19 @@ bool broker::send(
9797 // TODO: Add check to ensure buffer.size() fits in uint32_t
9898 header_t h = {" dds" , (uint32_t )buffer.size ()};
9999
100+ static constexpr auto timeout_header{std::chrono::milliseconds{100 }};
101+ socket_->set_send_timeout (timeout_header);
102+
100103 // NOLINTNEXTLINE
101104 auto res = socket_->send (reinterpret_cast <char *>(&h), sizeof (header_t ));
102105
103106 if (res != sizeof (header_t )) {
104107 return false ;
105108 }
106109
110+ static constexpr auto timeout_msg_body{std::chrono::milliseconds{300 }};
111+ socket_->set_send_timeout (timeout_msg_body);
112+
107113 res = socket_->send (buffer.c_str (), buffer.size ());
108114
109115 return res == buffer.size ();
You can’t perform that action at this time.
0 commit comments