From c1a09daf153a4a5f7e6824a50524b483dd508c03 Mon Sep 17 00:00:00 2001 From: Rainer Schielke <56628927+RainerSchielke@users.noreply.github.com> Date: Fri, 14 Jun 2024 21:40:03 +0200 Subject: [PATCH] avoid memory leaks if linked with static openssl libs (#1857) * New function SSLServer::update_certs. Allows to update certificates while server is running * New function SSLServer::update_certs. Added unit test * avoid memory leaks if linked with static openssl libs --------- Co-authored-by: CEU\schielke --- httplib.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/httplib.h b/httplib.h index 062f66b..b1b3f7d 100644 --- a/httplib.h +++ b/httplib.h @@ -726,6 +726,10 @@ private: assert(true == static_cast(fn)); fn(); } + +#ifdef CPPHTTPLIB_OPENSSL_SUPPORT + OPENSSL_thread_stop (); +#endif } ThreadPool &pool_;