Use boost asio post to fix build

This commit is contained in:
emeric
2025-02-10 16:54:25 +01:00
parent cefa60e734
commit c9fb398196
3 changed files with 19 additions and 16 deletions
+3 -2
View File
@@ -21,6 +21,7 @@
#include <boost/asio/bind_executor.hpp>
#include <boost/asio/dispatch.hpp>
#include <boost/asio/post.hpp>
#include "core/Exception.hpp"
#include "core/ILogger.hpp"
@@ -64,9 +65,9 @@ namespace lms::core::http
, _baseUrl{ baseUrl }
{
_client.done().connect([this](Wt::AsioWrapper::error_code ec, const Wt::Http::Message& msg) {
_strand.dispatch([this, ec, msg = std::move(msg)] {
boost::asio::post(boost::asio::bind_executor(_strand, [this, ec, msg = std::move(msg)] {
onClientDone(ec, msg);
});
}));
});
}