]> git.sesse.net Git - cubemap/commitdiff
Stop leaking TLS contexts.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 3 Apr 2018 16:25:14 +0000 (18:25 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 3 Apr 2018 16:25:14 +0000 (18:25 +0200)
server.cpp

index dbfe19b51d91981b348e738ebeee332e952db9fa..7f07483390a8b2846013e594668831b48d5b884b 100644 (file)
@@ -986,6 +986,10 @@ void Server::close_client(Client *client)
                delete_from(&client->stream->to_process, client);
        }
 
                delete_from(&client->stream->to_process, client);
        }
 
+       if (client->tls_context) {
+               tls_destroy_context(client->tls_context);
+       }
+
        // Log to access_log.
        access_log->write(client->get_stats());
 
        // Log to access_log.
        access_log->write(client->get_stats());