mirror of
https://github.com/OpenVPN/openvpn3.git
synced 2024-09-20 12:12:15 +02:00
OpenSSL: set SSL_MODE_RELEASE_BUFFERS to conserve memory by releasing unneeded buffers
SSL_MODE_RELEASE_BUFFERS will free buffers that are fully drained and re-allocate them as needed. Testing with proto.cpp suggests that this doesn't negatively affect performance. Signed-off-by: James Yonan <james@openvpn.net>
This commit is contained in:
parent
32e3ea117c
commit
846ed217df
@ -522,6 +522,9 @@ namespace openvpn {
|
||||
if (!ssl)
|
||||
throw OpenSSLException("OpenSSLContext::SSL: SSL_new failed");
|
||||
|
||||
// release unneeded buffers
|
||||
SSL_set_mode(ssl, SSL_MODE_RELEASE_BUFFERS);
|
||||
|
||||
// verify hostname
|
||||
if (hostname)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user