Server::Server()
{
- epoll_fd = epoll_create(1024); // Size argument is ignored.
+ epoll_fd = epoll_create1(EPOLL_CLOEXEC);
if (epoll_fd == -1) {
log_perror("epoll_fd");
exit(1);
Server::~Server()
{
safe_close(epoll_fd);
+
+ // We're going to die soon anyway, but clean this up to keep leak checking happy.
+ for (const auto &acceptor_and_context : tls_server_contexts) {
+ tls_destroy_context(acceptor_and_context.second);
+ }
}
vector<ClientStats> Server::get_client_stats() const