Skip to content

Commit

Permalink
Attempt to fix tsan false positive
Browse files Browse the repository at this point in the history
  • Loading branch information
anarthal committed Sep 21, 2024
1 parent 73ed8c1 commit 21054d7
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions include/boost/mysql/impl/internal/ssl_context_with_default.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,11 @@ namespace boost {
namespace mysql {
namespace detail {

inline asio::ssl::context create_default_ssl_context()
inline asio::ssl::context& default_ssl_context()
{
// As of MySQL 5.7.35, support for previous TLS versions is deprecated,
// so this is a secure default. User can override it if they want
asio::ssl::context ctx(asio::ssl::context::tlsv12_client);
return ctx;
}

inline asio::ssl::context& default_ssl_context()
{
static asio::ssl::context ctx = create_default_ssl_context();
static asio::ssl::context ctx(asio::ssl::context::tlsv12_client);
return ctx;
}

Expand Down

0 comments on commit 21054d7

Please sign in to comment.