mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-12 05:48:51 -04:00
Set the SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER flag, and explain why.
svn:r1394
This commit is contained in:
parent
44715517e8
commit
d5a3f1f116
@ -819,6 +819,7 @@ be_openssl_handshakecb(struct bufferevent *bev_base, void *ctx)
|
||||
struct bufferevent_openssl *bev_ssl = ctx;
|
||||
do_handshake(bev_ssl);
|
||||
}
|
||||
|
||||
static void
|
||||
be_openssl_handshakeeventcb(evutil_socket_t fd, short what, void *ptr)
|
||||
{
|
||||
@ -1028,6 +1029,10 @@ bufferevent_openssl_new_impl(struct event_base *base,
|
||||
&bufferevent_ops_openssl, tmp_options) < 0)
|
||||
goto err;
|
||||
|
||||
/* Don't explode if we decide to realloc a chunk we're writing from in
|
||||
* the output buffer. */
|
||||
SSL_set_mode(ssl, SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER);
|
||||
|
||||
bev_ssl->underlying = underlying;
|
||||
bev_ssl->ssl = ssl;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user