Skip to content

Commit

Permalink
avoid memory leaks if linked with static openssl libs (#1857)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
RainerSchielke and CEU\schielke committed Jun 14, 2024
1 parent 8438df4 commit c1a09da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions httplib.h
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,10 @@ class ThreadPool final : public TaskQueue {
assert(true == static_cast<bool>(fn));
fn();
}

#ifdef CPPHTTPLIB_OPENSSL_SUPPORT
OPENSSL_thread_stop ();
#endif
}

ThreadPool &pool_;
Expand Down

0 comments on commit c1a09da

Please sign in to comment.