Skip to content

Commit 4358b40

Browse files
committed
fix(userspace/falco): fix outputs_http timeout
libcurl timeout prevent to send alert through http keep trying to send the alert Signed-off-by: Clément Bénier <[email protected]>
1 parent d8c6af8 commit 4358b40

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

userspace/falco/outputs_http.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,13 @@ bool falco::outputs::output_http::init(const config &oc,
103103

104104
void falco::outputs::output_http::output(const message *msg) {
105105
CURLcode res = curl_easy_setopt(m_curl, CURLOPT_POSTFIELDS, msg->msg.c_str());
106-
CHECK_RES(curl_easy_perform(m_curl));
106+
107+
if(res == CURLE_OK) {
108+
do {
109+
res = curl_easy_perform(m_curl);
110+
} while(res == CURLE_OPERATION_TIMEDOUT);
111+
}
112+
107113
if(res != CURLE_OK) {
108114
falco_logger::log(
109115
falco_logger::level::ERR,

0 commit comments

Comments
 (0)