log(WARNING, "[%s] Lookup of '%s' failed (%s).",
url.c_str(), host.c_str(), gai_strerror(err));
}
+ freeaddrinfo(ai);
return -1;
}
bool complete = wait_for_activity(sock, POLLIN | POLLOUT, nullptr);
if (should_stop()) {
safe_close(sock);
+ freeaddrinfo(base_ai);
return -1;
}
if (complete) {
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