Skip to content

Commit

Permalink
fix debian 12 libcurl (#320)
Browse files Browse the repository at this point in the history
* fix debian 12 libcurl

* fix debian 12 libcurl

* fix debian 12 libcurl
  • Loading branch information
xquanluu authored Nov 18, 2023
1 parent 427aebb commit 3eb08b0
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/request-handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,11 @@ namespace drachtio {
/* cancel running timer */
timer.cancel();

if(timeout_ms > 0) {
/* update timer */
if(timeout_ms >= 0) {
// from libcurl 7.88.1-10+deb12u4 does not allow call curl_multi_socket_action or curl_multi_perform in curl_multi callback directly
timer.expires_from_now(boost::posix_time::millisec(timeout_ms));
timer.async_wait(boost::bind(&timer_cb, boost::placeholders::_1, g));
}
else if(timeout_ms == 0) {
/* call timeout function immediately */
boost::system::error_code error; /*success*/
timer_cb(error, g);
}

return 0;
}
Expand Down Expand Up @@ -205,7 +200,7 @@ namespace drachtio {
break;
}

DR_LOG(log_debug) << "RequestHandler::mcode_test ERROR: " << where << " returns " << s;
DR_LOG(log_debug) << "RequestHandler::mcode_test ERROR: " << where << " returns " << s << " code: " << code;

return -1;
}
Expand Down

0 comments on commit 3eb08b0

Please sign in to comment.