Skip to content

Commit

Permalink
Fixed regression with boost 1.86
Browse files Browse the repository at this point in the history
  • Loading branch information
jgaa committed Aug 27, 2024
1 parent 6a9839b commit 73cc971
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.24)

if (NOT DEFINED MYSQLPOOL_VERSION)
set(MYSQLPOOL_VERSION 0.4.0)
set(MYSQLPOOL_VERSION 0.4.1)
endif()

project(mysqlpool-cpp
Expand Down
10 changes: 7 additions & 3 deletions src/mysqlpool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,14 @@ asio::awaitable<Mysqlpool::Handle> Mysqlpool::getConnection(const Options& opts)


MYSQLPOOL_LOG_TRACE_("Waiting for a DB connection to become available...");
const auto [ec] = co_await semaphore_.async_wait(as_tuple(asio::use_awaitable));
if (ec != boost::asio::error::operation_aborted) {
MYSQLPOOL_LOG_DEBUG_("async_wait on semaphore failed: " << ec.message());
try {
co_await semaphore_.async_wait(as_tuple(asio::use_awaitable));
} catch(const boost::system::system_error& ec) {
if (ec.code() != boost::asio::error::operation_aborted) {
MYSQLPOOL_LOG_DEBUG_("async_wait on semaphore failed: " << ec.what());
}
}

MYSQLPOOL_LOG_TRACE_("Done waiting");
}

Expand Down

0 comments on commit 73cc971

Please sign in to comment.