mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
openssl: try to reduce memory usage
This commit is contained in:
parent
75c058e250
commit
59a2a787ee
2 changed files with 6 additions and 1 deletions
|
@ -406,6 +406,10 @@ lws_tls_client_create_vhost_context(struct lws_vhost *vh,
|
|||
SSL_CTX_set_options(vh->tls.ssl_client_ctx,
|
||||
SSL_OP_CIPHER_SERVER_PREFERENCE);
|
||||
|
||||
SSL_CTX_set_mode(vh->tls.ssl_client_ctx,
|
||||
SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER |
|
||||
SSL_MODE_RELEASE_BUFFERS);
|
||||
|
||||
if (info->ssl_client_options_set)
|
||||
SSL_CTX_set_options(vh->tls.ssl_client_ctx,
|
||||
info->ssl_client_options_set);
|
||||
|
|
|
@ -572,7 +572,8 @@ lws_tls_server_new_nonblocking(struct lws *wsi, lws_sockfd_type accept_fd)
|
|||
#endif
|
||||
#else
|
||||
|
||||
SSL_set_mode(wsi->tls.ssl, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
|
||||
SSL_set_mode(wsi->tls.ssl, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER |
|
||||
SSL_MODE_RELEASE_BUFFERS);
|
||||
bio = SSL_get_rbio(wsi->tls.ssl);
|
||||
if (bio)
|
||||
BIO_set_nbio(bio, 1); /* nonblocking */
|
||||
|
|
Loading…
Add table
Reference in a new issue